Systems, Methods, and Computer Program Products for Providing a Contactless Protocol

ABSTRACT

Systems, methods and computer program products are provided for managing contactless transactions. A first tap is performed when a system is placed within a predetermined proximity to a payment terminal. A first select command including an AID corresponding to a first application is received from the payment terminal. A first response based on the first select command is transmitted to the payment terminal. A data request including information indicating supported data types is received from the payment terminal. A second response based on the data request and including transaction data is transmitted to the payment terminal. The transaction data includes at least a portion of commerce data stored in the at least one memory.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims priority to U.S. Provisional Application Nos.61/651,276, filed May 24, 2012; 61/772,260, filed Mar. 4, 2013; and61/794,545, filed Mar. 15, 2013. The contents of these applications arehereby incorporated by reference herein.

BACKGROUND Field

Example aspects described herein relate generally to contactlessprotocols and more particularly to systems, methods, and computerprogram products for providing a contactless protocol allowinginteroperation between mobile devices, near field communication (NFC)readers, and point of sale (POS) systems.

Related Art

NFC technology is a standards-based wireless communication technologythat allows data to be exchanged between devices that are positionedwithin a certain proximity, generally less than ten centimeters apart.One use of such NFC technology is for making contactless transactions,including those for payment, access and ticketing. For example, anNFC-enabled mobile device can be provisioned with a payment applicationand payment account information (i.e., credentials associated with afinancial instrument such as credit or debit card) issued by aconsumer's financial institution. Each payment application can store andmanage multiple sets of commerce data associated with multiplemerchants, manufacturers or brands on a secure element. The applicationand payment account information are typically encrypted and stored in asecure area in the mobile device. The mobile device can, in turn, usethe NFC technology to communicate with NFC-enabled point of sale (POS)systems at attended locations such as stores and unattended locationssuch as vending machines. To pay, the consumer simply brings the mobiledevice to within approximately ten centimeters of a contactlesspayment-capable POS system and the transaction occurs. The process istypically the same as that used by the contactless credit and debitcards.

Placing the mobile device or contactless credit or debit card near anNFC-enabled reader so that they can be communicatively coupled issometimes referred to as a “wave” or “tap”. An application for a mobiledevice that allows consumers to “tap to pay” at a NFC-enabled POSsystems is generally referred to as a “wallet application” or “mobilewallet client application.” An application related to payments isgenerally referred to as a “payment” application. Common contactlesspayment applications are facilitated using any of the followingtechnologies: American Express® “ExpressPay,” Discover® “ZIP,”Mastercard® “PayPass” or Visa® “PayWave”.

NFC can also be used to read information about products or receivespecial offers, loyalty or rewards information from, for example, NFCtags, smart posters or smart billboards. An application related tooffers, loyalty and rewards is generally referred to herein as a“commerce” application.

One technical challenge associated with utilizing payment and commercetechnologies cooperatively involves the ability to allow the same tapevent that sends payment information to include additional informationassociated with merchant loyalty cards, offers, rewards, and the like.To this end, messaging technologies in existing NFC readers orNFC-enabled payment POS terminals stand to be upgraded to effectivelysupport a messaging technology that retrieves and/or receives bothpayment credentials (using the aforementioned payment protocols) andadditional commerce data (loyalty, offers, rewards, etc.) from mobiledevices used to perform the transactions. Yet another technicalchallenge involves publishing commerce elements (e.g., offers, loyaltycard credentials, rewards, and the like) into a mobile device such thatthose commerce elements may, in turn, be presented as part of a typicalPOS transaction (e.g., a purchase).

BRIEF DESCRIPTION

The example embodiments presented herein meet the above-identified needsby providing systems, methods and computer program products forproviding a contactless protocol.

In one embodiment, a system for managing contactless transactionsincludes at least one memory operable to store commerce data andfinancial instrument data, and at least one processor coupled to the atleast one memory. A first tap is performed, the first tap occurring whenthe system is placed within a predetermined proximity to a paymentterminal. A first select command including an AID corresponding to afirst application is received from the payment terminal. A firstresponse based on the first select command is transmitted to the paymentterminal. A data request including information indicating supported datatypes is received from the payment terminal. A second response based onthe data request and including transaction data is transmitted to thepayment terminal. The transaction data includes at least a portion ofthe commerce data stored in the at least one memory.

In another embodiment, a method for managing contactless transactionsincludes: performing a first tap, the first tap occurring when a mobiledevice is placed within a predetermined proximity to a payment terminal;receiving from the payment terminal a first select command including anAID corresponding to a first application; transmitting to the paymentterminal a first response based on the first select command; receivingfrom the payment terminal a data request including informationindicating supported data types; and transmitting to the paymentterminal a second response based on the data request, the secondresponse including transaction data. The transaction data includes atleast a portion of commerce data stored in at least one memory.

In another embodiment, a non-transitory computer-readable medium hassequences of instructions stored thereon for causing one or moreprocessors to: perform a first tap, the first tap occurring when amobile device is placed within a predetermined proximity to a paymentterminal; receive from the payment terminal a first select commandincluding an AID corresponding to a first application; transmit to thepayment terminal a first response based on the first select command;receive from the payment terminal a data request including informationindicating supported data types; and transmit to the payment terminal asecond response based on the data request, the second response includingtransaction data. The transaction data includes at least a portion ofcommerce data stored in at least one memory.

BRIEF DESCRIPTION OF THE DRAWINGS

The features and advantages of the example embodiments of the inventionpresented herein will become more apparent from the detailed descriptionset forth below when taken in conjunction with the following drawings.

FIG. 1 is a graphical representation of a platform architecture inaccordance with an exemplary embodiment.

FIG. 2 illustrates a single tap timing diagram according to an exemplaryembodiment.

FIG. 3 shows a timing diagram illustrating a commerce process flowincluding a double tap and post transaction data transmission accordingto an exemplary embodiment.

FIG. 4 shows a timing diagram illustrating a commerce process flowincluding a double tap, and post transaction data and paymenttransmissions according to an exemplary embodiment.

FIG. 5 illustrates an exemplary multi-block data flow according to anexample embodiment.

FIG. 6 illustrates windows or screen shots generated by the graphicaluser interface for a wallet application in accordance with an exampleembodiment of the present invention.

FIG. 7 illustrates a flow diagram illustrating an exemplary instantoffer implementation according to an embodiment of the presentinvention.

FIG. 8 is a collaboration diagram of functional modules deployed on acomputer system in accordance with an example embodiment of the presentinvention.

DETAILED DESCRIPTION

The example embodiments presented herein are directed to systems,methods and computer program products for providing a contactlessprotocol, which are now described herein in terms of an example merchanttransaction. This description is not intended to limit the applicationof the example embodiments presented herein. In fact, after reading thefollowing description, it will be apparent to one skilled in therelevant art(s) how to implement the following example embodiments inalternative embodiments (e.g., involving mass transit transactionsrequiring a wireless communications connection between a mass transitterminal and a mobile device).

The terms “application,” “applet,” “widget,” and/or the plural form ofthese terms are used interchangeably herein to refer to an application(functioning independently or in conjunction with other applications) orset or subset of instructions or code, which when executed by one ormore processors (e.g., in a mobile device, card reader, terminal, pointof sale (POS) system, or server) causes the processor(s) to performspecific tasks. For example, a wallet application can be used to conducttransaction- or interface-related functions such as storing, processing,accessing or transmitting financial, loyalty, offer, membership, oraccount data. A wallet application may also incorporate or interact withone or more payment applications, such as ExpressPay from AmericanExpress®, Discover® Network Zip⁸ m, MasterCard® PayPass™ and VisapayWave™ payment applets.

Generally, commerce-related services are made available through a suiteof applications available on several different platforms. The firstapplication (or suite of applications) exists onboard a server within amobile commerce (MoCom) platform. The MoCom platform is responsible forthe management of consumer data, including loyalty accounts and offers.In addition, the MoCom platform serves as a campaign manager for offers,providing a remote data store for offers made available to the consumervia the available merchant portals within a wallet application.

A second application exist onboard a mobile device in the form of awallet application. The wallet application provides the consumer'sprimary user interface (UI) and additional commerce application servicesthrough which the wallet application may access additional resourcesonboard a secure element (SE) of a mobile device.

A third application exists onboard a secure element of a mobile devicein the form of JavaCard applet. This applet stores commerce-related datasuch as loyalty and offer data and provides an interface through whichthe data may be managed. The applet is accessible through the use ofApplication Protocol Data Unit (APDU) commands as defined inInternational Standards Organization (ISO) 7816-4.

The fourth application exists onboard an NFC-enabled reader (referred toherein simply as a “reader”). The reader can be either a stand-alonedevice or attached to (and managed by) a point of sale (POS) terminal.This application facilitates or provides access to the interface with asecure element on a mobile device, performing specific tasks thatoptimize the APDU command/data exchange tasks. For example, it includesthe reading of loyalty or offer information following the placement of amobile device in proximity of a reader (i.e., a “tap”).

A fifth application (or suite of applications) exists onboard a merchantPOS system, including a POS terminal and any additionalmerchant-specific hardware/software. These applications manage the datarelated to payment/loyalty/offers/rewards received from a secure elementon a mobile device via a reader. In most cases, this data will then beforwarded to a corresponding MoCom or merchant specific platform(s).

FIG. 1 is a graphical representation of a platform architecture inaccordance with an exemplary embodiment. As shown in FIG. 1 , system 100includes a mobile device 110 communicatively coupled to a contactless(e.g., proximity or NFC) reader 120 and a mobile wallet platform 130.Reader 120 also is communicatively coupled to a POS terminal 140. POSterminal 140 may be within the same housing as reader 120.Alternatively, POS terminal 140 and reader 120 are communicativelycoupled with each other but each of these components is housedseparately.

Mobile device 110 may be, for example, a cellular phone or the like, andincludes a processor 111 a, memory 111 b, a contactless frontend (CLF)111 c, a baseband modem 111 d, and a user interface such as a display(not shown). Baseband modem 111 d is a digital modem that is used formobile network communications. CLF 111 e is circuitry which handles theanalog aspect of contactless or NFC communications and the communicationprotocol layers of a contactless transmission link. CLF 111 e also isused to exchange data between reader 120 and a secure element (or SE)112 contained in mobile device 110, for example, to execute contactlesstransactions.

Secure element 112 may be implemented as a Universal Integrated CircuitCard (UICC), embedded SE card, secure micro secure digital (microSD)card, and the like. Secure element 112 is generally considered securebecause it is a self-contained system, including dedicated memory, andis protected by hardware and software hardening techniques that areverified by independent testing.

Secure element 112 includes (e.g., stored thereon) one or more commerceapplets 113. Each commerce applet 113 is associated with a commerceservice and an account issued by a commerce service provider (SP). Aservice provider is a company, organization, entity, or the like, thatprovides services to customers or consumers. Examples of serviceproviders include account-issuing entities such as banks, merchants,card associations, marketing companies, and transit authorities. Aservice may be an activity, capability, functionality, work, or use thatis permitted or provided by a service provider, such as a paymentservice, credit, debit, checking, gift, offer or loyalty service,transit pass service, and the like.

A commerce service provider can provision (or have provisioned) ontosecure element 112 one or more separate commerce applets 113. Inaddition, other independent service providers can provision (or haveprovisioned) onto secure element 112 their own commerce applet(s) 113.Generally, a commerce applet 113 stores both loyalty and offers relateddata, providing an APDU interface through which this data can bemanaged. Commerce applet 113 operates as a generic storage container,allowing multiple loyalty/offers services to share mechanisms (e.g.,secure element, mobile device) for loyalty/offer data management. Ifmemory restrictions and performance requirements limit the amount ofloyalty/offers data that can be stored on secure element 112, additionaldata can be stored in mobile device memory 111 b and managed by theconsumer via commerce widget 115. For example, any graphic imagesrelated to an offer can be stored in memory 111 b in order to optimizesecure element memory allocation. Loyalty/offers data management can behandled by the corresponding offer platform 131, loyalty platform 132,or rewards platform 133.

Commerce applet 113 includes a cached merchant data table enabling thestorage/management of all data related to a given merchant. This allowsthe commerce data for a given merchant to be pre-loaded in secureelement 112 or mobile device 110 by a wallet application. Exemplarycommerce elements (and their corresponding tag values used during TagLength Value (TLV) encoding) that are included in the cached merchantdata table are defined below. This data is stored in a record orienteddata buffer. In an exemplary embodiment, a merchant identifier (MerchantIdentifier) is used as the key field for search/retrieval tasks.Optionally, an index (or hash table) may be created to improveperformance.

One or more commerce applets 113 can be loaded onto the secure element112, for example, during manufacture and/or configuration of the secureelement 112 and may be personalized to enable its use to conductcommerce transactions. A commerce applet 113 interfaces with reader 120via a commerce application programming interface (API) 123. In anexemplary embodiment, a commerce applet 113 is in the form of a JavaCardapplet and is accessible through the use of APDU commands as defined inISO 7816-4. Particularly, commerce applet 113 communicates commerceelements to reader 120 via secure element 112 using ISO 7816 commandsover the NFC ISO 14443 protocol.

Secure element 112 can also include one or more payment applets 117where each payment applet 117 is associated with a payment service andan account issued by a payment service provider. One or more paymentapplets 117 also can be loaded onto the secure element 112, for example,during manufacture and/or configuration of the secure element 112 andmay be personalized to enable its use to conduct payment transactions. Apayment applet 117 interfaces with reader 120 via API 124. In anexemplary embodiment, payment applet 117 is in the form of a JavaCardapplet and is accessible through the use of APDU commands as defined inISO 7816-4. Payment applet 113 also communicates payment elements toreader 120 via secure element 112 using ISO 7816 commands over the NFCISO 14443 protocol.

It should be understood that other communications between theaforementioned devices may include communications with or through otherintervening systems, hardware, and/or software, and such communicationsmay include receiving, transferring, and/or managing data.

A wallet application 114 stored on mobile device 110 includesinstructions which, when executed by the processor of the mobile device110, cause the mobile device 110 to act as an instrument, for example,for processing transactions such as contactless commerce and/or paymenttransactions. Wallet application 114 communicates, through the use ofAPDU commands as defined in ISO 7816-4, with the commerce applet 113 viacommerce API 116 and to payment applet 117 via payment API 118.

Commerce widget 115 is a component of the wallet application 114 thatprovides an interface for consumers to manage commerce elements (e.g.,loyalty card credentials, offers and rewards), for example, throughinteractions with the display or user interface of a mobile device.Commerce widget 115 maintains, for example, a master list of commerceelements present on the handset in a memory of the mobile device (e.g.,111 b). A subset of offers that have been identified as ready to be usedare, in turn, moved to secure element 112 to be communicated tocontactless reader 120 and POS terminal 140. Sensitive information, suchas loyalty account identifiers can be stored on secure element 112.

Payment widget 119 is a component of the wallet application 114 thatprovides an interface for consumers to manage payment elements (e.g.,credit or debit card credentials), for example, through interactionswith the display or user interface of a mobile device.

Reader 120 includes a reader commerce application 121 (referred toherein simply as a “reader application”) and a POS interface 122. Reader120 manages two interfaces: one interface is with the secure element 112in the mobile device 110 and the other interface is with POS terminal140 which includes a reader interface 141 and a commerce applicationdata handler 142. The functionality of reader 120 is the same whetherreader 120 is standalone and connected to a payments terminal ormerchant POS, or is integrated therein. Contactless paymentfunctionality is also contained in reader 120 but is not shown.

Mobile device 110 is further communicatively coupled to a mobile walletplatform 130, which in turn is communicatively coupled to offersplatform 131, loyalty platform 132 and rewards platform 133.Collectively, offers platform 131, loyalty platform 132 and rewardsplatform 133 can be referred to as a mobile commerce (MoCom) platform134 and are implemented on one or more servers, referred to hereinindividually and collectively as a MoCom server (now shown).

In one embodiment, a customer may use mobile device 110 to conduct acontactless transaction at a POS equipped with reader 120. The customerplaces the mobile device 110 within a predetermined required proximityof the contactless reader 120 (i.e., taps) causing CLF 111 c of themobile device 110 to communicate with reader 120 using, for example, NFCISO 14443 protocols.

Reader 120 also communicates with wallet application 114, commerceapplet 113, and/or payment applications on the mobile device 110 toexecute contactless transactions.

A secure element employs a Proximity Payment System Environment (PPSE)that serves as a directory of available credentials currently stored insecure element 112. Each credential is assigned a correspondingapplication identifier (AID) associated with a payment application andstored in the PPSE. When an NFC enabled-mobile device containing secureelement 112 is placed in the vicinity of an NFC-enabled contactlessreader, the contactless reader reads the credential and completes thetransaction. Before doing so, however, the reader is initialized.

On mobile device 110, PPSE is an application used to maintain a list ofpayment applications stored on secure element 112, and providesaccessibility to each payment application stored on the mobile device112 by making them visible or not visible (i.e., accessible) to systemsor devices.

Reader Initialization

Initialization of the reader 120 will now be described in more detail.In one embodiment, reader 120 implements a function referred to as anEntry Point Manager (EPM) to control which application in a mobiledevice is selected. In this embodiment, EPM controls whether reader 120sends a command to mobile device 110 to select an application thatperforms a commerce transaction or a command that performs a paymenttransaction. A command to select a commerce application is referred toherein as “Select Commerce.” A command to select a payment applicationis referred to herein as “PPSE Select.”

EPM also controls the start mode for the reader 120 and subsequentapplication switching during a checkout process. EPM thus facilitatesswitching (at reader 120) between the Select Commerce command for acommerce transaction and the PPSE Select command for paymenttransactions.

Commencing a Commerce Transaction on a Reader

A reader can be configured to initiate a commerce transaction on areader according to several modes, which are described below in furtherdetail. In one mode, referred to as “auto start”, reader application 121is the default application on the reader 120. Being the defaultapplication allows reader application 121 to be available to theconsumer as a first tap option (i.e., upon an initial couplingcommunication between the mobile device 110 and contactless reader 120).

Another mode, referred to as “manual start,” allows manual interventionto be used to initiate reader commerce application 121. Manualintervention can be in the form of a command from POS terminal 130(e.g., initiated by using a POS terminal interface) or from a consumerselecting a commerce application on a mobile device by using commercewidget 115.

Another mode, referred to as “payment with post transaction data,”involves controlling how payments are handled in an activity stream. Ifa merchant supports the provisioning of post transaction data, forexample, then payment and receipt of merchant data can be accomplishedby the same tap event, such as after the final total for a transactionhas been calculated.

Another mode is referred to as “payment first,” The payment first optionworks in conjunction with the auto start mode and/or the manual startmode to initiate a PPSE Select command for payment and then a SelectCommerce command to obtain commerce data (e.g., loyalty data, offerdata, reward data, and the like). Commerce data is interchangeablyreferred to herein as “commerce elements.”

Auto Start Mode

Referring to FIG. 1 , auto start mode provides commerce functionality onreader 120 at the beginning of a POS checkout process. When mobiledevice 110 taps reader 120, reader application 121 causes reader 120 tosend a “Select Commerce” message to mobile device 110 including the AIDcorresponding to the commerce application to be used to execute acontactless transaction. If the message is accepted by mobile device 110it sends a positive response message in return. Next, reader 120 sendsmobile device 110 a “Get Commerce Data” command. The Get Commerce Datacommand contains merchant specific data that secure element 112 uses toperform a commerce transaction. Also, control passes to the mobiledevice 110 upon successful completion of the Get Commerce Datatransaction. If reader 120 receives a negative response to “SelectCommerce” message it passes control back to the EPM.

Manual Start Mode

Referring still to FIG. 1 , in manual startup mode, reader 120 startsreader application 121 in response to a request from either the consumeror the POS terminal 140. In this manual start mode, at the beginning ofa checkout process, reader 120 is in a PPSE select state. For a consumerinitiated commerce transaction, the consumer selects the commerceapplication at the customer facing device (e.g., commerce widget 115).The customer facing device then sends a command to reader 120 to startthe reader application 121 via the EPM. For a POS terminal initiatedcommerce transaction, POS terminal 140 commands reader 120 to initializethe reader application 121. In one embodiment, this is initiated by acashier via an interface on the POS terminal 140.

Once reader commerce application 121 has been started on reader 120, thecommerce application will function as described in the auto start modeabove.

Payment with Post Transaction Data

In payment with post transaction data mode, a payment transaction can bemade such that post transaction data is communicated between POSterminal 140, reader 120, and secure element 112. This option allows thecommerce protocol to start at the beginning of the consumer checkout,but payment is not requested by the reader 120 until the finaltransaction total has been calculated.

POS terminal 140 sends a “Post Transaction” command to reader 120 with,for example, a transaction identifier (ID) and redeemed coupon IDs.Reader 120 then transmits a request for a tap for payment. The tapallows reader 120 to first request payment credentials from secureelement 112 and then cause the reader application 121 to send commercedata (e.g., coupon data) to secure element 112. Both functions areperformed in a single tap by the mobile device 110 at reader 120.

Payment First

In payment first mode, a payment can be made first, prior to a commercetransaction. This option accommodates a situation where the payment/PPSEprocess must precede any commerce processing. Payment first mode worksin conjunction with both auto and the manual start modes discussedabove. Payment and commerce processing is accomplished in a single tap.

Exemplary Commerce Process Flows Normal Commerce Process Flow (SingleTap)

FIG. 2 illustrates a single tap timing diagram 200 according to anexemplary embodiment. The following process flow can commence as itemsbeing purchased are being scanned at a POS. For convenience, reader 120(FIG. 1 ) and POS terminal 140 (FIG. 1 ) are illustrated as a singlecomponent and collectively referred to as payment terminal 201. Eachcomponent (i.e., reader 120 or POS terminal 140) is referred toindividually when applicable.

A merchant POS system 202 can be a merchant server operated by amerchant which controls the operation of payment terminal 201. In anexemplary embodiment, merchant POS system 202 commands payment terminal201 to activate the reader (“Activate Reader”) before items are beingscanned, as items are being scanned, or after the items are scanned. Ineach case, reader 120 requests a user (or consumer) to place a mobiledevice 110 in proximity of reader 120, as shown in step 250 (“Request‘tap’”). In response to a request for the user to place a mobile device110 in proximity of reader 120 (step 250), a consumer taps mobile device110 onto reader 120, as shown in step 251.

Once a NFC connection has been established between mobile device 110 andreader 120, the following command exchanges are initiated for serviceinitialization and processing of both a payment transaction and acommerce transaction. Payment transaction initialization and processingexchanges between secure element 112 and reader 120 include steps 260and commerce transaction initialization and processing exchanges betweensecure element 112 and reader 120 include steps 262. Steps 260 may beperformed before steps 262, afterward, or substantially simultaneously.

Referring first to steps 262, after a mobile device has tapped reader120, reader 120 sends to secure element 112 a Select Commerce commandalong with a particular commerce AID (“Select Commerce AID”) indicatingwhich commerce applet within secure element 112 it seeks to cooperatewith (e.g., commerce applet 113). In response, secure element 112 sendsa positive or negative response. A negative response (not shown) resultsin reader 120 terminating reader application 121 (FIG. 1 ) and passingcontrol to the EPM (not shown). If the response is positive (“PositiveResponse”), then reader 120 sends a command (“Get Commerce Data”) tosecure element 112 specifying identifying information, such as amerchant/store identifier, and any additional loyalty, offer or rewardschemes supported by that location, date and time information, theversion of reader commerce application 121 supported by reader 120, andany merchant capability data.

Secure element 112 returns corresponding commerce elements (e.g.,loyalty data, offer data, reward data) to reader 120 (“Loyalty & OffersData”) based on the fields in the Get Commerce Data command receivedfrom reader 120. In one embodiment, commerce applet 113 builds a packagecontaining the commerce data (e.g., a buffer or set of buffers includingloyalty data, offer data, or rewards data). In another embodiment, thebuffer is pre-built using memory space in the secure element 112.

Referring to steps 260, in one embodiment, reader 120 begins paymentprocessing by sending a PPSE request (“PPSE Select”) to secure element112.

If the Select Commerce AID and PPSE Select requests are successful, asshown in step 264 (“Read Success Indication”), payment terminal 201forwards the commerce application data and payment credentials it hasreceived to the merchant POS system 202 for processing (“Payment &Commerce Data”). Merchant POS system 202, in turn, records the loyaltyidentifier and offers (not shown) and applies any applicable discountsas product scanning continues as shown in step 266. This concludes thecommerce application process and the payment processing proceeds.

Once scanning has completed and a transaction amount has been approvedfor payment, a payment authorization request to a payment platform 203is made (“Payment Auth Request”). In turn, payment platform 203 returnsan authorization result (“Authorization Result”) indicating whether ornot the payment has been authorized.

Referring again to steps 260, in one embodiment, a PPSE Select requestby reader 120 to secure element 112 causes secure element 112 to returna PPSE payment AID indicating which payment applet (and hence whichcorresponding payment network) should be used to perform the paymenttransaction (“PPSE Payment AID”). In response, reader 120 sends a SelectAID indicating that it supports the particular applet (“Select AID”).File control information (FCI) associated with the payment applet (e.g.,FIG. 1, 117 ) is sent by secure element 112 to reader 120. Similarly,other payment and card information is sent by secure element 112 toreader 120 (“Payment/Card Data”).

FIG. 3 shows a timing diagram 300 illustrating a commerce process flowincluding a double tap and post transaction data transmission accordingto an exemplary embodiment. This embodiment can be used when a merchanthas data to communicate back to a mobile device. For convenience, reader120 (FIG. 1 ) and POS terminal 140 (FIG. 1 ) are illustrated as a singlecomponent and collectively referred to as payment terminal 301. Eachcomponent (i.e., reader 120 or POS terminal 140) is referred toindividually when applicable. Generally, POS terminal 140 (FIG. 1 )initiates a request for a second tap by sending a command, “PostTransaction Command”, to reader 120. Reader 120, in turn requests asecond tap from the consumer.

A merchant POS system 302 can be a merchant server operated by amerchant which controls the operation of payment terminal 301. In anexemplary embodiment, merchant POS system 302 commands payment terminal301 to activate reader 120 (“Activate Reader”) before items are beingscanned, as items are being scanned, or after the items are scanned. Ineach case, reader 120 requests a user to place a mobile device 110 inproximity of reader 120, as shown in step 350 (“Request ‘tap’”). Inresponse to a request for the user to place a mobile device 110 inproximity of reader 120 (step 350), a consumer taps mobile device 110onto reader 120, as shown in step 351.

Once a NFC connection has been established between mobile device 110 andreader 120, the following command exchanges are initiated for serviceinitialization and processing of both a payment transaction and acommerce transaction. Payment transaction initialization and processingexchanges between secure element 112 and reader 120 include steps 360and commerce transaction initialization and processing exchanges betweensecure element 112 and reader 120 include steps 362. Steps 360 may beperformed before steps 362, afterward, or substantially simultaneously.

Referring first to steps 362, after mobile device 110 has tapped reader120, reader 120 sends to secure element 112 a Select Commerce commandalong with a particular commerce AID (“Select Commerce AID”) indicatingwhich commerce applet within secure element 112 it seeks to cooperatewith (e.g., commerce applet 113). In response, secure element 112 sendsa positive or negative response. A negative response (not shown) resultsin reader 120 terminating reader application 121 (FIG. 1 ) and passingcontrol to the EPM (not shown). If the response is positive (“PositiveResponse”), then reader 120 sends a command to the secure element 112specifying identifying information, such as a merchant/store identifier,and any additional loyalty and offer schemes supported by that location,date and time information, the version of reader commerce application121 supported by reader 120 and any merchant capability data (“GetCommerce Data”). Secure element 112 returns corresponding commerceelements (e.g., loyalty and offers data) to reader 120 (“Loyalty &Offers Data”) based on the fields in the Get Commerce Data commandreceived from reader 120. In one embodiment, this is accomplished bycommerce applet 113, which builds a package of data (essentially abuffer or set of buffers including offers and loyalty data). In anotherembodiment, the buffer can be pre-built using memory space in the secureelement 112.

Referring next to steps 360, in one embodiment, a PPSE Select request byreader 120 to secure element 112 causes secure element 112 to return aPPSE payment AID indicating which payment applet (and hence paymentnetwork) should be used to perform the payment transaction (“PPSEPayment AID”). In response, reader 120 sends a Select AID indicatingthat it supports the particular applet (“Select AID”). FCI associatedwith the payment applet (e.g., 117) is sent by secure element 112 toreader 120. Similarly, other payment and card information is sent bysecure element 112 to reader 120 (“Payment/Card Data”). If the SelectCommerce AID and PPSE Select requests are successful, as shown in step364, payment terminal 301 forwards the commerce application data andpayment credentials it has received to the merchant POS system 302 forprocessing (“Payment & Commerce Data”). Merchant POS system 302, inturn, records the loyalty identifier and offers (not shown) and appliesany applicable discounts as product scanning continues as shown in step366.

Once scanning has completed and a transaction amount has been approvedfor payment, a payment authorization request to a payment platform 303is made (“Payment Auth Request”). In turn, payment platform 303 returnsan authorization result (“Authorization Result”) indicating whether ornot the payment has been made.

If there is data to send back to payment terminal 301, merchant POSsystem creates a command, “Post Transaction Data”, with correctlyformatted TLVs and forwards the data to reader 120. Upon receipt of aPost Transaction command payment terminal 301 will request a second tapfrom the consumer, as shown in step 368 (“Request 2^(nd) ‘tap’”).

Referring to step 369 and steps 370, when the mobile device 110 isplaced within proximity of reader 120 for the second time as shown instep 369, reader 120 sends a secure element 112 a Select Commercecommand along with a particular commerce AID (“Select Commerce AID”)indicating which commerce applet within secure element 112 it seeks tocooperate with (e.g., commerce applet 113).

If a negative response is received reader 120 terminates the readercommerce application 121. If a positive response is received, thenreader 120 forwards to secure element 112 the data received in the PostTransaction Data command from the POS terminal 140 (“Post TransactionData”). This concludes commerce processing for this transaction.

FIG. 4 shows a timing diagram 400 illustrating a commerce process flowincluding a double tap, and post transaction data and paymenttransmissions according to an exemplary embodiment. In this scenario thepayment and post transaction data are processed after a basket has beentotaled and all discounts have been applied. Usage of this flow iscontrolled by a reader start mode data element with a particular bit(e.g., “Payment with Post Transaction”) set on.

For convenience, reader 120 (FIG. 1 ) and POS terminal 140 (FIG. 1 ) areillustrated as a single component and collectively referred to aspayment terminal 401. Each component (i.e., reader 120 or POS terminal140) is referred to individually when applicable. Generally, merchantPOS system 402 initiates a request for a second tap by sending a posttransaction data command to reader 120. Reader 120, in turn requests asecond tap from the consumer.

A merchant POS system 402 can be a merchant server operated by amerchant which controls the operation of payment terminal 401. In anexemplary embodiment, merchant POS system 402 commands payment terminal401 to activate the reader (“Activate Reader”) before items are beingscanned, as items are being scanned, or after the items are scanned. Ineach case, reader 120 requests a user to place a mobile device 110 inproximity of reader 120, as shown in step 450 (“Request ‘tap’”). Inresponse to a request for the user to place a mobile device 110 inproximity of reader 120 (step 450), a consumer taps mobile device 110onto reader 120, as shown in step 451.

Once a NFC connection has been established between mobile device 110 andreader 120, the following command exchanges are initiated. The commandexchanges are performed for service initialization and processing ofboth a payment transaction and a commerce transaction. Paymenttransaction initialization and processing exchanges between secureelement 112 and reader 120 include steps 472, and commerce transactioninitialization and processing exchanges between secure element 112 andreader 120 include steps 462 and 474.

Referring first to steps 462, after a mobile device has tapped reader120, reader 120 sends to secure element 112 a Select Commerce commandalong with a particular commerce AID (“Select Commerce AID”) indicatingwhich commerce applet within secure element 112 to cooperate with (e.g.,commerce applet 113). In response, secure element 112 sends a positiveor negative response. A negative response (not shown) results in reader120 terminating reader application 121 (FIG. 1 ) and passing control tothe EPM (not shown). If the response is positive (“Positive Response”),then reader 120 sends a command to the secure element 112 specifyingidentifying information, such as a merchant/store identifier, and anyadditional loyalty and offer schemes supported by that location, dateand time information, the version of reader commerce application 121supported by reader 120 and any merchant capability data (“Get CommerceData”). Secure element 112 returns corresponding commerce elements(e.g., loyalty and offers data) to reader 120 (“Loyalty & Offers Data”)based on the fields in the Get Commerce Data command received fromreader 120. In one embodiment, this is accomplished by commerce applet113, which builds a package of data (e.g., a buffer or set of buffersincluding offers and loyalty data). In another embodiment, the buffercan be pre-built using memory space in the secure element 112.

At step 464, reader 120 indicates to the consumer that the transactionis complete and that the handset can be removed from payment terminal401, which causes reader 120 to forward the commerce application data tothe POS terminal 140 and, in turn, merchant POS system for processing(“Loyalty & Offers Data”). A clerk may continue to process the shoppingbasket.

Merchant POS system 402, records the loyalty identifier and offers (notshown) and applies any applicable discounts as product scanningcontinues as shown in step 466. After the basket total has beencalculated, merchant POS system 402 sends a request for payment topayment terminal 401 and sends post transaction data to payment terminal401 (if data is available to send) (“Send Post Transaction Data andPayment Req”).

At step 468, payment terminal 140 requests a tap for payment. Reader120, in turn, activates the reader field. When mobile device 110 isdetected in the field of reader 120, payment processing is performed asshown in steps 472. Particularly, a PPSE Select request is made byreader 120 to secure element 112 to cause secure element 112 to return aPPSE payment AID indicating which payment applet (and hence paymentnetwork) should be used to perform the payment transaction (“PPSEPayment AID”). In response, reader 120 sends a Select AID commandindicating that it supports the particular applet (“Select AID”). FCIassociated with the payment applet (e.g., FIG. 1, 117 ) is sent bysecure element 112 to reader 120. Similarly, other payment and cardinformation is sent by secure element 112 to reader 120 (“Payment/CardData”).

Referring to steps 474, if payment terminal 401 has received posttransaction data from merchant POS system 402, reader 120 starts thecommerce application 121 (FIG. 1 ) and sends secure element 112 theSelect Commerce command along with a particular commerce AID (“SelectCommerce AID”) after a mobile device has tapped reader 120 a secondtime. The Select Commerce AID identifies which commerce applet withinsecure element 112 should be used to cooperate with reader 120. Inresponse, secure element 112 sends a positive or negative response. Anegative response (not shown) results in reader 120 terminating readerapplication 121 (FIG. 1 ) and passing control to the EPM (not shown). Ifthe response is positive (“Positive Response”), then reader 120 sendspost transaction data to the secure element 112 (“Post TransactionData”), with correctly formatted TLVs. This concludes commerceprocessing for this transaction.

If the Select Commerce AID and PPSE Select requests are successful,payment terminal 401 forwards the payment application data and paymentcredentials it has received to the merchant POS system 402 forprocessing (“Payment/Card Data”). In turn, merchant POS system sends apayment authorization request to a payment platform 403 (“Payment AuthRequest”). In turn, payment platform 403 returns an authorization result(Authorization Result) indicating whether or not the payment has beenauthorized.

If the commerce and payment credentials and information have beensuccessfully read, reader 120 can provide a notification either throughan interface on payment terminal 140, commerce widget 115 (FIG. 1 ) orpayment widget 119 (FIG. 1 ), as shown in step 478 (“Read SuccessIndication”).

Commerce Message Specifications Data Encoding

In one embodiment, all command/response data is encoded using BER-TLV(ISO 7816-4 Annex D) format. In some cases, the TLV (Tag, Length, Value)may be nested (embedded TLV). Due to the flexible nature of the TLVencoding format, the tagged data may be placed in any order. This istrue when formatting the data for both incoming and outgoing payloads.In addition, this data is stored in record oriented tables. The order ofthe TLV encoded data elements stored therein is not critical; however,some data may be placed at the beginning of the record to enhanceindex/search performance. Thus, the record data tables provided in thisdocument are supplied as samples for reference purposes.

A tag is encoded using a “private” tag class and a tag type representinga primitive data object encoded on one or more subsequent bytes.Therefore, the first byte (tag class) is set to 0xDF. In all cases, thedata element tag is defined on a single byte. Therefore, the second tagbyte has the most significant bit (b8) set to 0. This allows up to 128valid tag values (0x00−0x7F).

Length encoding supports both the short or long forms. When the lengthis less that (<) 128 bytes, the most significant bit (b8) is set to 0and the actual length is specified in the remaining bits (b7−b1). Whenthe length is greater than (>) 128 bytes, the most significant bit (b8)is set to 1 (length mask=0x80) and the remaining bits (b7-b1) define thenumber of subsequent bytes in the length field. Those subsequent bytesencode an integer equal to the number of bytes in the value field.

BER-TLV Example

Assuming the incoming data uses a tag value of 0x21 (Consumer ID) with alength of 8 bytes and a value of (0x1122334455667788), the data isencoded as shown in Table 1:

TABLE 1 Tag Length Value DF 21 08 11 22 33 44 55 66 77 88 DF 21 81 08 1122 33 44 55 66 77 88 DF 21 82 00 08 11 22 33 44 55 66 77 88

TLV encoding allows for the length indicator to be expressed in multiplebytes. Preferably multi-byte length is supported. In short form, thelength field consists of a single byte where bit 8 is set to 0 and bits7 to 1 encode the number of bytes in the value field. One byte can thusencode any number from zero to 127. Any number from one to 127 isencoded in the same way in BER-TLV length field as in Le and Le fields.The encoding differs for zero, 128 and more. See, for example, thecoding of data objects in the Get Commerce Data command described below.

In long form, the length field consists of two or more bytes. Bit 8 ofthe first byte is set to 1 and bits 7 to 1 are not all equal, thusencoding the number of subsequent bytes in the length field. Thosesubsequent bytes encode the number of bytes in the value field. ISO/IEC7816 does not use the “indefinite length” specified by the basicencoding rules of ASNI ISO/IEC 7816, which supports length fields ofone, two, . . . up to five bytes (Table 2). In ISO/IEC 7816, the values‘80’ and ‘85’ to ‘FF’ are invalid for the first byte of length fields.

TABLE 2 BER-TLV length fields in ISO/IEC 7816 1′ 2″″ 3

 , 4

  5′′′ byte byte byte byte byte N 1 byte ‘00’ n tn t27 to ‘7F’ ‘81’ ‘00’to ‘FF n t.o 2 · ss ‘82’ ‘CHJIJO’ to

FFf f′ — — G to t s 535 4 bytes ‘83’ ‘rooGDtJO’ o ‘FFFFFF’ — G torn?Tl215 5 byt.e,s ‘84’ ‘I}Q{Ki|1C>O|J’ to 0 to 4 294 967 295

‘H-FFFFFF’

indicates data missing or illegible when filed

Select Commerce Applet

In one embodiment, the processing starts when reader 120 detects amobile device 110 in the field of reader 120 and NFC communications havecommenced. At that time, reader 120 sends a command to secure element112 to select a commerce applet, particularly a “Select Commerce”command. The Select Commerce command (also referred to as a “SelectCommerce Applet” command) is standardized as defined in the ISO 78016-3specification. An example Select Commerce command structure is shown inTable 3:

TABLE 3 Select Commerce Applet CLA INS P1 P2 Le Data Le 00 A4 04 00 09A00000048510010101 00

Secure element 112 in mobile device 110 validates the “Select Commerce”command and sends back an appropriate response. Example responses (alsoreferred to as “Status Codes”) are shown in Table 4:

TABLE 4 Status Codes SW1 SW2 Description 90 00 Successful execution ofcommand 67 00 Wrong data length 69 01 Application ID not supported 69 99Application not available 6A 82 Application not installed

All responses other than ‘90 00’ (“Successful execution of command”)cause commerce application 121 (FIG. 1 ) to terminate in reader 120 andpass control to the EPM.

Get Commerce Data

Upon commencement of the reader application 121 and communicationsbetween reader 120 and secure element 112 initiating, reader 120 sends acommand to mobile device 110 to obtain commerce data, “Get CommerceData.” An exemplary Get Commerce Data command is defined below in Tables5 and 6. In this example, specific loyalty and offers data is beingrequested. The “Merchant Capability” field is utilized by reader 120 todetermine which fields need to be present in the request and responsedata.

Date and time stamp information are optional. In one embodiment, thedate time is in synchronization with the POS. In the event that thisinformation is not available from the POS, the date/time from the POSterminal 140 can be used. If date and time is not available, reader 120will not send the date time stamp data element.

In an exemplary embodiment, the data elements contained in the GetCommerce Data request are preconfigured in the reader 120 or POSterminal 140 at setup time. The data may be modified after the reader120 has been installed and configured.

TABLE 5 Get Commerce Data CLA INS P1 P2 Le Data Le 90 50 00 00 xxMerchant ID/ Store ID [+ Loyalty 00 IDs + Coupon Types + Date/Time-Stamp + Application Version + Merchant Capability]

TABLE 6 Command Data Byte Data Element Size Value Req MerchantIdentifier Tag 2 0xDF 31 Y Identifier Length 1 xx Merchant Identifier xx[MerchantID] MerchantStore_ID Tag 2 0xDF 32 Y Merchant_Store_ID Length 1xx Merchant_Store_ID xx (StoreID/Location) Loyalty_ID Tag #1 For 2 0xDF41 Opt Secondary loyalty Identifier Length #1 1 xx LoyaltyID #1 xx[Loyalty ID] (Hex) . . . Loyalty_IDr Tag #X For 2 0xDF 41 Opt Secondaryloyalty Loyalty Identifier Length #X 1 xx LoyaltyID #X xx Loyalty ID(Hex) Date_Time_Stamp Tag 2 0xDF 11 Opt Date_Time_Stamp Length 1 0x07Date_Time_Stamp 7 BCD (yyyymmddhhmmss) Commerce_App_Version Tag 2 0xDF12 Y Commerce_App_Version Length 1 0x02 Commerce_App_Version Data 2[Major + Minor] Hex Merchant_Capability Tag 2 0xDF 33 YMerchant_Capability Length 1 0x02 Merchant_Capability Data 2 2 Bytes HexTerminal_Startup_Mode Tag 2 0xDF 34 Opt Terminal_Startup_Mode Length 10x02 Terminal_Startup_Mode Data 1 1 Bytes Hex Total: <var>

Table 7 defines the possible Status Word values that may be returned bythe Get Commerce Data command.

TABLE 7 Status Codes SW1 SW2 Description 90 00 Successful Execution ofCommand 61 xx More data to follow 67 00 Wrong Data Length 69 09 InternalError

Any response other than ‘61 xx’ or ‘90 00’ will result in reader 120terminating commerce application 121 and passing control to the EPM,after recording the error and storing the data for forwarding tocommerce widget 115.

If the Get Commerce Data request is correctly formatted, commerce applet113 on secure element 112 filters the data based on the merchantidentifier (“Merchant_ID”), loyalty identifier (“Loyalty_ID”) and offertype code (“Offer_Type_Code”) to format a response data for reader 120based on the version number in the request. Commerce applet 113 mayreturn more than one Loyalty ID and multiple Offers messages based onthe configuration in the wallet. Table 8 lists exemplary response data:

TABLE 8 Example Response Data Byte Data Element Size Value Consumer_IDTag 2 0XDF21 Consumer_ID Length 1 0x10 Consumer_ID Data 16 [Consumer ID]Loyalty_ID Tag #1 2 0xDF41 Loyalty_ID Length #1 1 xx Loyalty Identifier#1 xx [Loyalty ID] Loyalty_Account_Code Tag #1 2 0xDF43Loyalty_Account_Code Length #1 1 xx Loyalty_Account_Code #1 xx [AcctCode] Loyalty_ID Tag #2 2 0xDF 41 Loyalty_ID Length #2 1 xx Loyalty_IDData #2 xx [Loyalty ID] Loyalty_Account_Code Tag #2 2 0xDF43Loyalty_Account_Code Length #2 1 xx Loyalty_Account_Code Code #2 xx[Acct Code] . . . Offer_ID Tag #1 2 0xDF51 Offer_ID #1 ID Length 2 X′81xx′ Offer_ID #1 ID Value xx [Coupon ID] Offer_Code #1 Code Tag 2 0xDF53Offer_Code #1 Code Length 2 0x′81xx′ Offer_Code #1 Code Value xx [CouponCode] Offer_ID Tag #2 2 0xDF51 Offer_ID #2 ID Length 2 0x′81xx′ Offer_ID#2 ID Value xx [Coupon ID] Offer_Code #2 Code Tag 2 0xDF53 Offer_Code #2Code Length 2 0x′81xx′ Offer_Code #2 Code Value xx [Coupon Code] . . .Total: <var>

The following is an exemplary response data parsing sample. The NFCreader (or POS terminal) delivers this commerce data to a POS system ina string of data that may contain consumer, loyalty and/or offer data.The merchant POS system can then parse the data to obtain the loyaltyand offer data, and process the data per the merchant's specifications.

OF 21 10 00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF OF 41 06 18 DB6E 23 F4 OB OF 43 OD 02 31 38 44 42 36 45 32 33 46 34 30 42 OF 51 08 8877 66 55 44 33 22 05 OF 53 09 02 42 41 31 38 37 36 35 34 OF 51 08 88 7766 55 44 33 22 06 OF 53 OC 02 41 39 39 39 39 31 33 33 35 37 38 OF 51 0888 77 66 55 44 33 22 07 OF 53 10 02 5A 58 31 37 39 35 36 37 35 34 38 3331 43 46 OF 51 08 88 77 66 55 44 33 22 08 OF 53 OC 02 31 38 30 30 38 3732 30 30 30 31 OF 51 08 88 77 66 55 44 33 22 09 OF 53 33 02 57 4B 52 5031 32 33 34 35 36 37 38 39 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F50 50 57 50 57 50 57 50 57 50 57 50 57 50 57 50 57 50 57 50 57 50 40 AlData parsing example OF 21 10 00 11 22 33 44 55 66 77 88 99 AA BB CC DDEE FF (Consumer ID) OF 41 06 18 DB 6E 23 F4 OB (MoCom Loyalty ID) OF 43OD 02 31 38 44 42 36 45 32 33 46 34 30 42 (Consumer Loyalty Code) OF 5108 88 77 66 55 44 33 22 05 (MoCom Offer ID) #1 OF 53 09 02 42 41 31 3837 36 35 34 (Merchant Offer Code) #1 OF 51 08 88 77 66 55 44 33 22

Post Transaction Data

As explained above, a Post Transaction Data command provides a mechanismto receive data back from a merchant POS system (MPOS). This command isinitiated by the merchant POS terminal 140 and preferably is supportedin the merchant capability field. In an exemplary embodiment, thiscommand consists of a single frame of data with a maximum data size of255 bytes. The contents of the data use standard TLV formatting but mayalso be variable. This command enables dynamic reconciliation or posttransaction data consolidation. Additional data tags may be defined forthe transmission of additional data from the POS terminal/MPOS to thesecure element 112 in mobile device 110. An exemplary post transactiondata command (“Post Transaction Data”) is illustrated in tables 9 and10:

TABLE 9 Post Transaction Data Command CLA INS P1 P2 Le Data Le 90 52 0000 xx <TLV Encoded Post 00 Transaction Data>

TABLE 10 Command Data Data Element Byte Size Value Req Transaction ID 20x DF 61 Opt Transaction ID Length 1 xx Transaction ID Data xx Merchantgenerated Transaction ID Offer_ID Code #1 2 0XDF 51 Opt Offer_ID Length#1 1 xx Offer_ID Data #1 xx Coupon ID . . . Offer_ID Code #X 2 0xDF 51Opt Offer_ID Length #X 1 xx Offer_ID Data #X xx Coupon ID Total: <var>

Multi-Block Data Handling

FIG. 5 illustrates an exemplary multi-block data flow according to anexample embodiment. When secure element 112 has more than 255 bytes ofdata to send, a Get Response command (CO) is used to retrieve theremaining response data. Particularly, this command is used to obtainthe remaining data when the commerce applet 113 must send more than, forexample, 255 bytes of response data.

Referring to FIG. 5 , after a user taps a commerce-enabled mobile device110 to reader 120, reader 120 sends a Select Commerce command to thesecure element 112 of the mobile device 110. A positive response (‘9000’) causes reader 120 to send a Get Commerce Data command. In response,secure element 112 returns loyalty and offers data. As shown in FIG. 5 ,the Get Commerce Data response status SW1 flag is set to ‘61’ and theSW2 flag is set to ‘00’.

A Get Response command is triggered when the SW1 flag in the GetCommerce Data response is set to ‘61’. In this example, the SW2 flag isset to ‘00’ because commerce applet 113 on mobile device 110 may notknow how much data is left to send. The subsequent response to the GetResponse command also contains an SW1 flag set to ‘61’, causing a secondGet Response command to be sent by reader 120 to mobile device 110.

This sequence will terminate when the SW1 flag of the Get Commerce Dataresponse is set to any value other than ‘61’. For example, an SW1 valueof ‘90’ in response to a Get Response command as shown in FIG. 5 willindicate normal completion. Any other SW1 value can be logged as anerror.

Table 11 defines exemplary settings for the Get Response Data APDUcommand:

TABLE 11 Get Response Data CLA INS P1 P2 Le Data Le 90 CO 00 00 00<none> 00

The actual length of the remaining data is variable. Therefore, the Ledata length can be OxOO; allowing the commerce applet 113 to manage avariable length response.

Table 12 defines possible status word values (“Status Codes”) that maybe returned by the Get Response Data APDU command.

TABLE 12 Status Codes SW1 SW2 Description 90 00 Successful execution ofcommand 61 xx More data to follow 67 00 Wrong data length 69 09 Internalerror

Reader Configuration Data

In one embodiment, during the installation and configuration of reader120 certain merchant and commerce specific data are loaded and saved inreader 120. This data is used by reader 120 to fill in the Get CommerceData command from reader 120. These data elements can be updated as newfeatures and functions become available.

Commerce AID

As explained above, a commerce AID is sent in the Select Commercecommand. If the command is accepted by mobile device 110, commerceapplet 113 is started and APDU command/response flows will start betweenreader 120 and secure element 112. In an exemplary embodiment, thecommerce AID value is A00000048510010101. This value can be hardcoded onreader 120. In one embodiment, reader 120 is not required to supportpartial selection.

Merchant ID

A merchant identifier (Merchant_ID (DF31)) can be loaded onto reader120. Merchant ID is a value assigned by a service provider. In oneembodiment, this value is assigned by the MoCom platform operator. Thisis required to allow commerce applet 113 to filter the loyalty andcoupon data, and send the appropriate items to the reader 120.

Merchant Store ID

A merchant store identifier value (Merchant_store_ID (DF32)) is loadedto the reader 120 and is a value assigned by a service provider. Thisvalue can be used, for example, for reporting purposes.

Loyalty_ID

A loyalty identifier value (Loyalty_ID (DF41)) is used when multipleLoyalty IDs are being requested during a tap. This is accomplished bysetting the Secondary Loyalty in Merchant Capabilities (DF33). Thisallows commerce applet 113 to return additional loyalty numbers in theresponse to a Get Commerce Data command. Multiple (e.g., 5) additionalLoyalty IDs may be coded in the Get Commerce Data request.

Offer_Type_Codes

Offer type codes (Offer Type Codes (DF54)) are loaded onto reader 120.Values assigned to Offer Type Codes are assigned by a service provider.This value is used by the commerce applet 113 to filter offers and sendonly the appropriate items to reader 120. Multiple Offer_Type_Codes canbe defined and sent to the secure element 112 in the Get Commerce Datacommand.

Commerce_Application_Version

A commerce application version number

(Commerce_Application_Version) can be loaded onto reader 120 torepresent the version of the commerce reader specification that theapplication on reader 120 is coded to and certified for.

Merchant_Capabilities

The Merchant Capabilities value represents the Commerce featuressupported by a particular merchant. This data element can also be usedby reader 120 to format the Get Commerce Data command.

Terminal_Startup_Mode

A terminal start mode command (Terminal Start Mode (DF34)) commandsreader 120 to provide the mechanism used to start commerce application121. This data element is not sent to the secure element 112. This dataelement will also be used to define processing flows between reader 120and secure element 112 on the handset.

Get Commerce Data Fields

Table 13 provides an exemplary definition of data required by reader 120to format the Select Commerce and Get Commerce Services commands:

TABLE 13 Max Size Data Data Element Tag Bytes Format Commerce AID 09 HexMerchant ID DF 31 8 Hex Merchant Store ID DF 32 32 ASCCI LoyaltyIdentifier #1 thru X DF 41 8 BCD Date and Time Stamp DF 11 7 BCDSpecification Version DF 12 2 Hex (Major/Minor) Merchant Capabilities DF33 2 Binary Commerce Start Mode DF 34 2 Binary

Commerce Applet Version Format

A Commerce Applet Version value is a two-byte hex field the first bytecontaining the major version (xx) and the second byte contains the minorversion (xx). These fields are updated in accordance to the specificversion of the reader commerce technical specification that isimplemented on reader 120. In an exemplary embodiment, the firstofficial release of the commerce application 121 is 0x0I00.

Merchant Capabilities

A merchant capabilities field (Merchant Capabilities Field (DF 33))determines which commerce functions are being implemented by themerchant. Reader 120 can pass this field to mobile device 110, andmobile device 110 uses the information to build a response frame,referred to as Commerce Data Response frame. Table 14 illustratesexemplary merchant capabilities:

TABLE 14 Merchant Capability Data Commerce Start Mode Format Byte BitValue NFC reader function 1 8 1 = Merchant If Bit 8 is on the readerwill MSB Loyalty Support send the required Merchant 0 = No ID andoptionally a Loyalty ID for the merchant 1 7 1 = Secondary Bit 8 must beon. Additional Loyalty Loyalty ID's is included 0 = No in the GetCommerce Data request 1 6 1 = Offers Support Offer Type fields isincluded 0 = No in Get Commerce Data request 1 5 1 = Additional OfferThe merchant can request support additional offers 0 = No in the GetCommerce request 1 4 1 = Contactless Some merchants may choose Paymentsupport to only accept Commerce 0 = No but not contactless payments.This bit setting is information only. It will not stop the PPSE processfrom happening. 1 3 1 = Enterprise Merch ID 0 = No 1 2 1 = Cloud BasedIndicates that the merchant Offer can support cloud 0 = No based offers(Future) 1 2 0 Reserved for Future Use 1 1 1 = Post Transaction Thereader will receive Data support redemption data from 0 = No the POS andforward it to the handset 2 8-1 0 Reserved for Future Use

Commerce Start Mode Format

A commerce start mode format value (Commerce Start Mode (DF34))indicates to reader 120 what mechanism is to be used to start commerceapplication 121 on reader 120. In one embodiment, this data element isnot sent to the mobile device 110 in the Get Commerce Data command. Inanother embodiment, this data element is optional. Table 15 illustratesexemplary start modes can be used to commence commerce application 121.In an exemplary embodiment, bits 7 and 8 are exclusive and only one bitis turned on at a time:

TABLE 15 Commerce Start Mode Byte Bit Value Reader function 1 8 1 = AutoStart At the start of the check the MSB 0 = No reader will questCommerce AID at the first TAP 1 7 1 = Manual Start The reader will onlyselect 0 = No Commerce AID after some user intervention. 1 6 1 = Paymentwith Payment and Post Transaction Post Transaction Data will occur onData TAP 2 0 = No 1 5 Payment First Payment PPSE will precede in Auto orManual start modes 1 4-1 0 Reserved for Future Use 2 8-1 0 Reserved forFuture Use

Reader Message Forwarding

While reading commerce application data from the mobile device 110,reader 120 forwards the data to a merchant POS system or POS applicationresident on a POS terminal 140. Reader 120 strips off the APDU headersand un-blocks the data from the mobile device 110. The Tagged TLV framesare then wrapped in the appropriate protocol and forwarded to themerchant POS system or POS application running on the POS terminal forprocessing.

Commerce Response Data Description

During a successful interaction with a reader 120, data will be returnedto the POS merchant system (or POS terminal). This information willtypically be composed of a consumer loyalty number and/or some number ofoffers that the merchant defined and loaded to the consumer's wallet.

Consumer ID

A consumer identifier (Consumer ID) is a unique identifier that isassigned to a consumer during the wallet activation process. Typically,Consumer ID will stay with a consumer even if the consumer moves herwallet to a new mobile device or different mobile network. In apreferred embodiment, Consumer ID is sent from the mobile device to thereader on every commerce-related interaction, even if the handset has noloyalty or offers data to send. The presentation of Consumer ID can beused by the merchant POS system to trigger specific actions related to apayment-only tap.

Loyalty ID

A loyalty identifier (Loyalty ID) is sent along with each consumerloyalty number requested during a tap event. Loyalty ID is a uniquevalue assigned to each merchant loyalty program assigned by the MoComplatform. In most cases the Loyalty ID received by the reader will matchthe Merchant ID that was configured by the Get Commerce data command.Use of this information by a merchant system is optional.

Consumer Loyalty Code

A consumer loyalty code (Consumer Loyalty Code) matches the loyaltynumber assigned to the consumer for a specific merchant loyalty program.Wallet application 114 allows for multiple loyalty numbers to bepresented at the tap. If the system is set up for multiple consumerloyalty codes, each consumer loyalty code will be preceded by its uniqueloyalty ID.

Offer ID

A mobile commerce offer identifier (Offer ID) is sent along with eachconsumer offer number sent during a commerce-related session. The OfferID is a unique value assigned to each offer delivered to a consumerwallet. In one embodiment, no two Offer IDs generated by the MoComplatform will have the same value.

Merchant Offer Code

A merchant offer code (“Merchant Offer Code” or “Offer Number”) isgenerated by the merchant and loaded to the consumer's walletapplication through various means. This number matches the same offerthat is defined on the merchant POS system for processing. There can bemultiple merchant offers (e.g., 10) presented during a single commercetransaction. The merchant system parses the incoming data to extract theindividual merchant offers.

Commerce Response Data Fields

Table 16 defines exemplary data elements that may be returned to themerchant POS system after a successful commerce transaction:

TABLE 16 Max Size Data Element Tag Bytes Data Format Consumer ID DF 2116 BCD Loyalty ID DF 41 8 Hex Consumer DF 43 32 ASCII, Hex, Loyalty CodeBCD Offer ID DF 51 8 BCD Merchant DF 53 48 ASCII, Hex, Offer Code BCD

In one embodiment, a data element “Terminal Start Mode” is passed toreader 120 but will not be passed to the secure element 112. Reader 120uses this information to control when Select Commerce and Select PPSEcommands are sent to the secure element 112.

Reader Commerce Application Functionality

The following section provides a list of functions that the Commerceapplication within reader 120 performs. Some of these functions areautomated, while others are triggered via an API call from the POSterminal or merchant POS.

Select Commerce AID Command

After the Commerce application is started on reader 120 and a device isdetected in the field of reader 120, the first command sent is SelectCommerce AID. The command will contain the RID value assigned by ISO anda PIX value generated by a commerce service provider. The Commerce AIDvalue is A00000048510010101. This value should be hard coded on reader120.

Get Commerce Data Command

The Get Commerce Services Data command is a general data request to thesecure element 112. The Get Commerce Data has a number of required andoptional fields that communicate information to commerce applet 113.

Commerce applet 113 uses this information to build the data elementsthat need to be sent to reader 120. Reader 120 uses the fields in theMerchant Capability records to determine which optional fields need tobe included in the request to the handset.

Post Transaction Data

The Post Transaction Data command was created to provide a mechanism toreceive data back from the MPOS. This command consists of a single frameof data with a maximum data size of 255 bytes. The contents of the datause standard TLV formatting, but the contents may be variable.Additional data tags may be defined for the transmission of additionaldata from the POS Terminal/MPOS to secure element 112 in mobile device110.

NFC Error Recovery

In a preferred embodiment, reader 120 is able to recover from a readererror generated when the handset is prematurely removed from the NFCfield. Reader 120 signals the read error to the consumer via a failureinterface such as a speaker that outputs a “beep” or display thatprovides an optical indication such as via lights. The consumer is askedto tap again and the transaction that was in progress during the erroris restarted. In the case where multiple transactions are beingprocessed, such as a commerce transaction and a PPSE transaction, reader120 will try to recover the last process being executed.

Large Data Block Support

In an exemplary embodiment, reader 120 reads and writes multiple255-byte blocks of data to and from mobile device 112 in a single tapprocess.

Date and Time Stamp Support

When reader 120 has connectivity to the merchant POS system, the dateand time can be retrieved from the POS terminal at the start of thetransaction.

TLV Master Tag List

Table 17 defines the data elements and corresponding tag values andtarget/max byte sizes used by commerce based applications. Additionalvalues have been provided for those elements with a limited/fixed valuerange.

TABLE 17 APDU Commands Max Data Element Tag Size Description CommerceServices Shared Data Elements DATE_TIME_STAMP 0xDF11 7 Date/Time stamp(yyyymmddhhmmss) COMMERCE_APP_VERSION 0xDF12 2 Supported Commerceapplication Version Number Consumer Data Elements CONSUMER_ID 0XDF21 16MoCom Platform specific consumer identifier CONSUMER_KEY 0xDF22 16 MoComPlatform generated consumer specific 3DES key CONSUMER_CERT 0xDF23 8MoCom Platform generated consumer signature/ certificate Merchant DataElements MERCHANT_ID 0xDF31 8 MoCom Platform specific merchantidentifier MERCHANT_STORE_ID 0xDF32 32 MoCom Platform specific merchantstore identifier ASCII character data MERCHANT_CAPABILITY 0xDF33 2Supported Commerce application Services NFC 0xDF34 2 NFC enabled paymentREADER_START_MODE terminal startup mode (provided by Merchant POS Systemduring initialization) Merchant Capabilities MERCAP_MERCHANT_ 0x80 1 TheGet Commerce Data LOYALTY request includes a valid merchant identifierused to determine the Loyalty data received by the applet.MERCAP_ADDITIONAL_ 0x40 1 The Get Commerce Data LOYALTY request includesadditional Loyalty Identifiers. Additional Loyalty data is determined bythe specified Loyalty ID(s). MERCAP_MERCHANT_ 0x20 1 Offer type fieldsare OFFERS included in Get Commerce Data request MERCAP_ADDITIONAL_ 0x101 The Get Commerce Data OFFERS request includes a valid merchantidentifier used to determine the offers data received by the applet.MERCAP_PAYMENT 0x08 1 Indicates merchant supports contactless payment.MERCAP_ENTERPRISE 0x04 1 Indicates support for Enterprise Merchant IDMERCAP_CLOUD 0x02 1 Indicates support for cloud based offers and LoyaltyMERCAP_REDEMPTION 0x01 1 The NFC reader supports the transmission ofoffer redemption data (from the POS) to the applet via the Redeem Offercommand. Service Provider Platform Data Elements PLATFORM_SIGNATURE 0x718 MoCom Platform generated MAC/Signature appended to command/dataoriginating from the platform for remote verification purposes (dataintegrity/ authenticity). PLATFORM_KEY 0x72 16 MoCom Platform KeyPLATFORM_CERT 0x73 8 MoCom Platform Certificate Loyalty Loyalty DataElements EMBEDDED_TLV_ 0xDF40 xx Embedded TLV loyalty data LOYALTY_DATAtag LOYALTY_ID 0xDF41 8 MoCom Platform specific loyalty identifierLOYALTY_STATUS 0xDF42 1 Loyalty card/account status (see below)LOYALTY_ACCOUNT_ 0xDF43 32 Loyalty account (barcode CODE data)LOYALTY_MAC_ 0xDF44 8 MoCom Platform specific SIGNATURE MAC/Signaturefor integrity/ authenticity verification Transaction Log TransactionData Elements EMBEDDED_TLV_ 0xDF60 xx Transaction log record dataTRANSACTION_LOG tag TRANSACTION_ID 0xDF61 16 Transaction ID (assigned byPOS) TRANSACTION_STATUS 0xDF62 3 Transaction log record data tag OffersOffer Data Elements EMBEDDED_TLV_ 0xDF50 xx Embedded TLV offer dataOFFER_DATA tag OFFER_ID 0xDF51 8 MoCom Platform specific offeridentifier OFFER_STATUS 0xDF52 1 Offer status (see below) OFFER_CODE0xDF53 130 Offer (UPC/EPC/GS1 Databar) barcode data OFFER_TYPE_CODE0xDF54 9 Offer Type (see below) OFFER_MAC_ 0xDF55 8 MoCom Platformspecific SIGNATURE data security signature OFFER_UPDATE_FLAG 0xDF56 1Update flag (synchronization status)

Table 18 provides a master list of exemplary APDU commands supported bythe Commerce Applet 113.

TABLE 18 Command CLA INS P1 P2 Le Data Le Get 90 50 00 00 xx Date/TimeStamp + 00 Commerce Merchant ID + Data Store ID [+ Commerce applicationVersion + Merchant Capabilities + Transaction ID + Loyalty IDs + OfferCodes] Post 90 52 00 00 xx <TLV-Encoded 00 Transaction Transaction Data>Data Get 90 CO 00 00 xx None Remaining Data

Specially Formatted Data Elements

Data elements included in the commerce data payload may include a formatbyte that identifies the data encoding used for that element. The dataencoding is specified by the merchant to ensure compatibility at thepoint of sale. The formatted data value is supplied by the commerceplatform to the wallet application 114. Thus, no additionalinterpreting/formatting is necessary between the platform 130, wallet114, secure element 112, and reader 120/POS terminal 140 (collectivelyreferred to as “payment terminal”). It is the role of the paymentterminal (or merchant POS system) to properly interpret the data andsupply it to the merchant system for processing.

In an exemplary embodiment, the following data elements include thefollowing format value:

-   -   Loyalty Account Code (DF 43)    -   Offer Code (DF 53)

Table 19 defines possible format byte values and their correspondingencoding rule:

TABLE 19 Format Encoding Byte Rule Description 0x00 Hexadecimal Eachbyte of data is encoded in (raw) hexadecimal format. 0x01 Binary CodedEach nibble represents a single digit. Decimal Thus, only decimal valuesare specified. (BCD) A data stream containing an odd number (length) ofdigits includes the hex value ‘F’ in the first nibble of the datastream. 0x02 ASCII Each byte represents an ACII value that isinterpreted as such and handled as its corresponding CHAR value. In mostcases, these data streams are converted into a String before beingpassed to the merchant POS system for processing.

A BCD encoded data value that includes the hexadecimal value ‘F’ in thefirst nibble shall identify a data stream containing an odd number ofdigits. Thus, the BCD data stream 12345 is encoded in 3 byte buffer asfollows: 0xF12345.

Exemplary Implementations

FIG. 6 illustrates windows or screen shots generated by the graphicaluser interface for a wallet application in accordance with an exampleembodiment of the present invention. For purposes of this exemplaryimplementation, the mobile device 110 has some redeemable offers andloyalty cards stored in memory 111 b.

The wallet home screen 601 features a strip of merchant tiles 604. Atile is present for every merchant that has a redeemable object (e.g., aredeemable offer or loyalty card) present in the mobile wallet. The usermay, for example, swipe through the tiles, left and right, to find aparticular merchant. Once the particular merchant is found, the tile isselected to open a merchant offer view 602. This can be done prior tomaking a transaction or immediately prior to making the transaction,such as while waiting in line, or earlier (e.g., while browsing througha store).

The merchant offer view 602 presents a list of redeemable offers 603available in the wallet. Non-redeemable promotions may be presented aswell. If present, a loyalty card 605 is also presented and madeaccessible from the merchant offer view 602.

If the selected merchant is not a commerce-enabled merchant, there is nooption presented to load offers for a commerce transaction. If themerchant is a commerce-enabled merchant, however, one or more buttons oricons 606 a, 606 b are presented allowing offers to be loaded for acommerce transaction.

The user may select an offer (e.g., 606 a), and then select the “Done”bar at the bottom of the screen.

In an exemplary embodiment, a limit as to the number of offers can beenforced by secure element 112 (e.g., 10 offers), and the user interfaceof commerce widget 115 enforces this limit while the user is activatingoffers. The “Done” bar is the trigger to load the selected offers intosecure element 112. If there are offers from another merchant in thesecure element 112, they can be removed at the same time as the newoffers are loaded—this ensures that there are only offers from onemerchant present in the 112 at any given time.

When the secure element load is complete, the user taps the mobiledevice 110 to reader 120. What happens next depends on a few factors. Ifthe reader that is tapped is not capable of processing commerceelements, the selected payment card is sent, but no commerce elements(e.g., offers or loyalty credentials) are sent. A post-tap message ispresented through the reader interface indicating that paymentcredentials were sent, with no other information.

If the reader that is tapped is capable of processing commerce elements,but the merchant-ID does not match the selected merchant, offers willnot be sent. Commerce applet 113 in secure element 112 can search for aloyalty card for this merchant-ID and transmit loyalty credentials, ifpresent. A post-tap message is presented through an interface indicatingthat an event took place, identifying the merchant and reporting thatloyalty credentials were sent (if they were available) as well as thepayment credentials.

If the reader that is tapped is a commerce-enabled reader and themerchant-ID matches the selected merchant, selected offers and (ifpresent) the loyalty card credentials for the merchant are sent. Mobiledevice 110 can present a post-tap message through the commerce widget115 user interface confirming that offers and loyalty (if present) weresent, along with payments.

Following the tap, offers that were loaded into the secure element 112are left in secure element 112 until the user removes them or selectsoffers from another merchant. Alternatively, if the offers expire, it isremoved from the secure element 112 when wallet maintenance isperformed. In an exemplary embodiment, the selected merchant will remainthe “active” merchant on the wallet home page until the user selects adifferent merchant.

Instant Offer Implementation

FIG. 7 illustrates a flow diagram illustrating an exemplary instantoffer implementation according to an embodiment of the presentinvention. In this embodiment, a mobile commerce (MoCom) platform can beintegrated with merchant POS system to implement a mechanism for usersto select offers by using a wallet application and/or instant offersmerchants make available to consumers.

A wallet application running on a mobile device can be used to allowconsumers to pay for purchases and present loyalty and offers via apayment terminal. One way a consumer can redeem an offer is by selectingthe offer via the wallet application to be presented at checkout.

Consumers can also be provided with offers that can be instantlyredeemed through the wallet application. Such offers are referred toherein as “instant offers”. This feature allows merchants to rewardconsumers who use a mobile device running the wallet application to makepurchases. Consumers benefit from the instant offer because, among otherreasons, they do not need to specifically select an offer via the walletapplication. Depending on the implementation, an instant offer can beused along with an offer explicitly selected by the consumer from thewallet application. Whether an offer is selected by the consumer orprovided “instantly,” a consumer identifier (“Consumer ID”) valueretrieved from the mobile device (e.g., from secure element 112) is usedas the key for retrieving and redeeming an instant offer.

Referring to FIG. 7 , in one embodiment, a consumer selects offers fromthe wallet application to be presented at the checkout. At block 702, apayment is requested at a POS. If at block 704, it is determined thatthe payment is not a contactless payment, then at block 706 the paymentprocess is completed via alternative means (e.g., by using cash) and thecheckout process is completed. If it is determined at block 704 that thepayment will be a contactless payment, then the mobile device user isasked to tap his or her mobile device to the reader (e.g., reader 120described above).

In response, the mobile device is tapped to the reader. During the tapevent, a number of data elements can be passed between the reader and asecure element on the mobile device as described above. In oneembodiment, the payment card data, Consumer ID, loyalty number, andoffer codes are passed to the reader during the tap of the reader. Inthis embodiment, Consumer ID is sent to the reader even if the tap isfor a payment only transaction with no offers selected.

If at block 708 it is determined that a MoCom Consumer ID is notpresent, then at block 706 the payment process is completed and thecheckout process is completed by processing the payment.

If it is determined at block 708 that a MoCom Consumer ID is present,then at block 710 a determination is made as to whether a MoCom offer ispresent (e.g., an offer selected by the user via a wallet application).If at block 710 a determination is made that a MoCom offer is present,then a determination is made at block 712 as to whether a MoCom instantoffer has been defined as well. If at block 712 it is determined that aMoCom instant offer has been defined, both the MoCom offer (i.e., anoffer selected by a user via a wallet application interface) and MoCominstant offer are processed, as shown in block 714. Once the MoCom offerand/or MoCom instant offer are processed, the payment associated withthose offers is processed as shown at step 706.

If at block 710 a determination is made that a MoCom Offer is notpresent, then at block 716 a determination is made as to whether a MoCominstant offer has been defined. If not, the payment is completed asshown at step 706. If a determination is made at block 716 that theMoCom instant offer is present, the MoCom instant offer is processed asshown at block 718 and the payment associated with the MoCom instantoffer processed as shown at block 706.

If a determination is made at block 712 that a MoCom instant offer hasnot been defined, then a standard MoCom offer is processed, as shown atblock 720 and at block 706 the payment processed is completed.

The merchant POS system can use the presence of the ConsumerID totrigger the use of an instant offer. The offer could be, for example, acents off or percentage off type offer that a merchant using the MoComsystem defines. This can be, for example, applied for the purchase of aspecific item. In an exemplary implementation, the merchant is providedan option of turning instant offer functionality off or on when a walletoffer is presented during the tap.

The instant offer can be defined by a merchant and then distributed toits retail locations. The offer can also have an associated specificstart and end date. The ability to distribute instant offers todifferent geographical areas can be taken into account as well.

Commerce Applet Package/Applet/Instance Management

The following section defines the AID values and application specificparameters used during download/installation of commerce applet 113(FIG. 1 ). Table 20 defines AIDs.

TABLE 20 AIDs Description AID Package AID A000000485100101 Applet AIDA00000048510010100 Instance AID AO 00 00 04 85 10 01 01 01

Applet-Specific Installation Parameters

The commerce applet's initial commerce services data characteristics maybe provisioned via applet-specific installation parameters. This datafollows the standard JavaCard AID and installation parameters.

These parameters must be coded as shown in Table 21:

TABLE 21 Applet Installation Parameters Byte Default Provisioning DataSize Value Maximum Number of Loyalty Records 2 20 Maximum Number ofPre-Load Merchant 2 1 Records Maximum Number of Transaction Records 2 3Total: 6

Memory Requirements

Exemplary memory specifications are listed in Table 22 below. The firstmemory specification, “Package Download,” indicates the approximateamount of non-volatile (EEPROM) memory space required to download thecommerce applet package. The second memory specification,“Instantiation,” indicates the amount of memory required to instantiatea new instance of the commerce applet. The final memory requirement,“Transient Data Space,” indicates the amount of volatile (RAM) memorythat is used by each instance of the commerce applet.

TABLE 22 Applet Memory Requirements Memory Byte Size Package Download9396 Instantiation 6260 Transient Data Space 518

Data Management

The available commerce (e.g., loyalty, offers, rewards, etc.) data isstored within the commerce applet 113 onboard the secure element 112.All of the relevant commerce data is stored in three separate datatables. These data tables are managed by the commerce applet 113.Additional commerce data may be stored/managed within a correspondingcommerce widget 115 onboard the handset.

In one embodiment, the data elements defined herein have a variablelength. Therefore, all elements (included those with a fixed length)will be assigned a maximum length. As a result, all lengths and bytesize references should be interpreted as maximum values.

Commerce Data

Commerce applet 113 manages a few data fields that are shared by allcommerce service applications. These data fields are stored inpersistent data variables. An exemplary data element, Consumer ID, isdefined in Table 23. Additional elements may be stored as well, such asconsumer/platform keys and certificates.

TABLE 23 Variable Type Description ConsumerID byte[ ] Unique consumer IDassigned to a specific MoCom consumer/user.

Loyalty Data Table

Commerce applet 113 also includes loyalty data tables enabling thestorage/management of all consumer loyalty data.

Table 24 defines the data elements (and their corresponding tag valuesused during TLV encoding) that are included in the loyalty data table.

TABLE 24 Loyalty Data TLV Tag Byte Encoding Data Element Value SizeOverhead LOYALTY PROGRAM ID 0xDF41  8 3 LOYALTY ACCOUNT CODE 0xDF43 32 3Total: 40 6 Minimum TLV Encoded Record Size: 46

The data is stored in a record oriented data buffer, where the loyaltyidentifier (“Loyalty ID”) is utilized as the key field forsearch/retrieval tasks.

In an exemplary embodiment, TLV Data Overhead includes a (maximum) offive bytes per element data overhead (2-byte tag and 3-byte length) asrequired by the BER-TLV encoding format.

In an alternative embodiment, an index (or hash table) may be createdinternally to speed up the Loyalty ID search task.

Cached Merchant Data Table

Commerce applet 113 also includes a merchant cached data table enablingthe storage/management of all data related to a given merchant. Thisfeature allows the commerce data for a given merchant to be pre-loadedby the wallet application 114 in order to improve performance.

Table 25 defines the data elements (and their corresponding tag valuesused during TLV encoding) that are included in the cached merchant datatable.

TABLE 25 Cached Merchant Data TLV Tag Byte Encoding Data Element ValueSize Overhead MERCHANT ID 0xDF31  8 3 LOYALTY PROGRAM ID 0xDF41  8 3LOYALTY ACCOUNT CODE 0xDF43  32 3 OFFER ID 0xDF51  8 3 OFFER CODE 0xDF53130 3 . . . Maximum 104 6 Minimum TLV Encoded Record Size: 110

The data is stored in a record oriented data buffer, where the merchantidentifier (“Merchant ID”) is utilized as the key field forsearch/retrieval tasks. An index (or hash table) may be createdinternally to speed up the Merchant ID search task.

In an exemplary embodiment, TLV Data Overhead includes a (maximum) offive bytes per element data overhead (2-byte tag and 3-byte length) asrequired by the BER-TLV encoding format.

Transaction Log

Commerce applet 113 includes a transaction log that is used to trackusage within the MoCom platform at the merchant point-of-sale. Duringcommerce widget 115 and secure element 112 synchronization tasks, thistransaction log is transmitted up to the commerce widget 115 for laterover-the-air (“OTA”) synchronization with the MoCom platform.

The actual content of the transaction log depends upon the Get CommerceData command data/parameters provided by reader 120 during thetransaction process at the merchant point-of-sale. An exact copy of thedata payload sent to the commerce applet 113 by reader 120 via the GetCommerce Data APDU command is stored within that commerce transaction'srecord.

The transaction status is determined based on the logical result of thecommerce data processing. If a data/processing error is detected withinthe commerce applet 113, the corresponding internal error code can beappended to the transaction log.

The following table defines the data elements (and their correspondingtag values used during TLV encoding) that are included in thetransaction log.

TABLE 26 Transaction Log Data TLV Tag Byte Encoding Data Element ValueSize Overhead Get Commerce Data command xx 255 4 parameter(s)/dataTRANSACTION_STATUS 0xDF62  3 3 Total: 266 7 Maximum TLV Encoded RecordSize: 273

The data is stored in a record oriented data buffer. A variable GetCommerce Data command data size is supported.

TLV Data Overhead includes a (maximum) of five bytes per element dataoverhead (2-byte tag and 3-byte length) as required by the BER-TLVencoding format.

Error Management

In an exemplary embodiment, error detection and management is handled attwo levels. First, the response of the APDU command includes a two-byteStatus Word result value. These responses are standardized and dictatedby ISO 7816-4. However, a second level of error handling is managedinternally by the Commerce Services applet. The second level ofmanagement includes the issuance of a standard 0x6909 status word in theresponse to the APDU command. Following this response, the client mayissue a second command (“Get Internal Error Code”) to obtain a two-byteinternal error code. This code may be cross-referenced to Table 27.Table 27 provides details on where and why the error occurred within theapplet.

Particularly, Table 27 provides a master list of all possible internalerror codes returned by the Get Internal Error Code APDU commandsupported by the commerce applet.

TABLE 27 Internal Error Codes Error Code Error Description Ox0101 SSEINTERNAL ERROR APPLET NOT PROVISION Ox0102 SSE_ INTERNAL_ ERROR_COMMAND_ NOT_ ALLOWED_ VIA_ CONTACTLESS_ INTERFACE Ox0103 SSE INTERNALERROR COMMAND NOT ALLOWED INVALID CONTEXT Ox0201 SSE INSTALL INVALIDINSTALLATION PARAMETER LENGTH Ox0301 SSE PARSE COMMAND DATA INVALIDCOMMERCE TAG Ox0302 SSE PARSE COMMAND DATA INVALID CONSUMER ID LENGTH0x0302 SSE PARSE COMMAND DATA INVALID MERCHANT ID LENGTH 0x0302 SSEPARSE COMMAND DATA INVALID MERCHANT LOCATION LENGTH 0x0303 SSE PARSECOMMAND DATA INVALID DATE TIME STAMP LENGTH 0x0304 SSE_ PARSE_ COMMAND_DATA_ INVALID_ MERCHANT_ COMMERCE_ APP_ VERSION LENGTH 0x0305 SSE_PARSE_ COMMAND_ DATA_ INVALID_ MERCHANT_ CAPABILITIES_ LENGTH 0x0306 SSEPARSE COMMAND DATA INVALID LOYALTY ID LENGTH 0x0307 SSE_ PARSE_ COMMAND_DATA_ INVALID_ LOYALTY_ ACCOUNT_ CODE_ LENGTH 0x0308 SSE PARSE COMMANDDATA INVALID OFFER ID LENGTH 0x0309 SSE PARSE COMMAND DATA INVALID OFFERTYPES CODE LENGTH 0x030A SSE PARSE COMMAND DATA INVALID TRANSACTION IDLENGTH 0x030B SSE_ PARSE_ COMMAND_ DATA_ INVALID_ CACHED_ MERCHANT_DATA_ OFFER COUNT LENGTH 0x030C SSE_ PARSE_ COMMAND_ DATA_ INVALID_CACHED_ MERCHANT_ DATA_ LENGTH 0x030D SSE PARSE COMMAND DATA INVALIDCOMMERCE TAG 0x0A01 SSE GET RESPONSE REMAINING DATA INVALID RESUME STATE0x0B01 SSE VERIFY REQUIRED PARAMETERS INVALID PARAMETER TAG 0x0B02SSE_VERIFY_REQUIRED_PARAMETERS_DATE_TIME_STAMP_NOT_ PRESENT 0x0B03 SSEVERIFY REQUIRED PARAMETERS MERCHANT ID NOT PRESENT 0x0B04SSE_VERIFY_REQUIRED_PARAMETERS_MERCHANT_STORE_ID_NOT_ PRESENT 0x0B05SSE_VERIFY_REQUIRED_PARAMETERS_MERCHANT_COMMERCE_APP_ VERSION NOTPRESENT 0x0B06 SSE_VERIFY_REQUIRED_PARAMETERS_MERCHANT_CAPABILITIES_NOT_PRESENT 0x0B07 SSE VERIFY REQUIRED PARAMETERS LOYALTY ID NOT PRESENT0x0B08 SSE_VERIFY_REQUIRED_PARAMETERS_LOYALTY_ACCOUNT_CODE_NOT_ PRESENT0x0B0A SSE VERIFY REQUIRED PARAMETERS CONSUMER ID NOT PRESENT 0x0B0BSSE_VERIFY_REQUIRED_FARAMETERS_CACHED_MERCHANT_DATA_ OFFER COUNT NOTPRESENT 0x0B0C SSE_VERIFY_REQUIRED_PARAMETERS_EMBEDDED_TLV_CACHED_MERCHANT DATA NOT PRESENT 0x0C01 SSE GET COMMERCE DATA INVALID WALLETSTATE 0x0E01 SSE_ UPDATE_ CACHED_ MERCHANT_ DATA_ FAILED_ CMD_ BUFFER_LENGTH EXCEEDED 0x1 101 LME INVALID LOYALTY TAG 0x1 102 LME INVALIDLOYALTY ID LENGTH 0x1 103 LME INVALID LOYALTY ACCOUNT CODE LENGTH 0x1201LME GET LOYALTY DATA RECORD NOT FOUND 0x1202 LME GET LOYALTY DATAINSUFFICIENT BUFFER LENGTH 0x1301 LME UPDATE LOYALTY ID NOT SPECIFIED0x1401 LME DELETE LOYALTY ID NOT SPECIFIED 0x1402 LME DELETE LOYALTYDATA RECORD NOT FOUND 0x1501 LME GET LOYALTY RECORD INSUFFICIENT BUFFERLENGTH 0x3101 TLVME MAX DATA LENGTH EXCEEDED 0x3201 TLVME APPEND FAILEDINVALID LENGTH 0x3301 TLVME GET NEXT TAG FAILED INVALID CONTEXT NOCURRENT TAG 0x3401 TLVME GET TLV OBJECT FAILED INVALID TAG CLASS 0x3402TLVME GET TLV OBJECT FAILED INVALID LENGTH 0x3403 TLVME GET TLV OBJECTFAILED TLV LENGTH NOT SUPPORTED 0x3501 TLVME GET NEXT ELEMENT FAILEDINVALID TAG CLASS 0x3502 TLVME GET NEXT ELEMENT FAILED TLV LENGTH NOTSUPPORTED 0x3503 TLVME GET NEXT ELEMENT FAILED INVALID LENGTH 0x3504TLVME GET NEXT ELEMENT FAILED BUFFER LENGTH EXCEEDED 0x4101 DMEDATAMANAGER INVALID RECORD NUMBER 0x4102 DME DATAMANAGER INVALID RECORDLENGTH 0x4103 DME DATAMANAGER RECORD NOT INITIALIZED 0x4104 DMEDATAMANAGER RECORD STORE FULL 0x4105 DME DATAMANAGER INVALID DATA LENGTH0x4106 DME DATAMANAGER INSUFFICIENT BUFFER SIZE 0x4201 DME DATAMANAGERPRIMARY INDEX NOT ACTIVE 0x4202 DME DATAMANAGER PRIMARY INDEX KEY NOTSPECIFIED 0x4203 DME DATAMANAGER INVALID PRIMARY INDEX KEY LENGTH 0xA201SUE NO INSTALL PARAMETERS FOUND 0xA202 SUE INSUFFICIENT APPLICATIONPARAMETER BUFFER LENGTH 0xA203 SUE NO APPLICATION SPECIFIC INSTALLPARAMETERS FOUND 0xD1O1 SSE SECURITY AUTHENTICATION FAILED 0xD102 SSESECURITY INVALID CIPHER DATA LENGTH 0xD103 SSE SECURITY INVALID KEY DATALENGTH 0xD104 SSE SECURITY INVALID DIVERSIFICATION DATA LENGTH 0xDC00SSE SECURITY CRYPTO EXCEPTION UNDEFINED REASON 0xDC01 SSE SECURITYCRYPTO EXCEPTION ILLEGAL VALUE 0xDC02 SSE SECURITY CRYPTO EXCEPTIONUNINITIALIZED KEY 0xDC03 SSE SECURITY CRYPTO EXCEPTION NO SUCH ALGORITHM0xDC04 SSE SECURITY CRYPTO EXCEPTION INVALID INIT 0xDC05 SSE SECURITYCRYPTO EXCEPTION ILLEGAL USE

Commerce Services

The following section provides a detailed description of the APDUcommands available via the commerce applet 113.

APDU Commands

All communications/data exchanges with the commerce applet 113 will beperformed via APDU commands as defined in the ISO 7816 standards.Additional restrictions and data handling are described below.

Command Usage Restrictions

For security reasons, a subset of the available commerce servicecommands can be restricted to specific connection modes. In oneembodiment, referred to as “contact (wallet) mode,” all of the APDUcommands defined in Table 18 above are available. However, incontactless mode, the following commands are allowed:

-   -   Get Version    -   Get Internal Error Code    -   Get Response (Remaining Data)    -   Get Commerce Data

If any other APDU command is sent in contactless mode, an exception isthrown and the Internal Error Code is set to the corresponding invalidcommand mode value (0x0102).

In one embodiment, the Get Commerce Data command may only besuccessfully executed when wallet application 114 is open. When thewallet application 114 is either started or terminated by the consumer,it is the responsibility of the wallet application 114 to notify awallet companion applet (WCAp) so that it can perform monitoring,management and/or security functions. The WCAp applet, in turn, notifiesthe commerce applet of the wallet application state via a sharedinterface. WCAp applets are discussed in U.S. patent application Ser.No. 13/857,400 entitled “Systems, Methods, and Computer Program ProductsFor Securing And Managing Applications On Secure Elements,” which ishereby incorporated by reference in its entirety.

Data Payload Management

Commerce applet 113 validates that all required parameters have beenincluded in the data payload. However, in most cases all non-relevantdata elements can be ignored and a command will still process normally.In one embodiment, the length expected (Le) value is not verified by thecommerce applet 113. It can be assumed to be the value zero, allowingthe commerce applet 113 to send all available data via the response.

Get Version

The Get Version command is used to obtain the version information of thecurrently loaded commerce applet 113. The version will be stored inthree bytes (xx.yy.zz), where xx=release version, yy=major version(Wave) number, and zz=minor version number. This information is assignedby, for example, a MoCom platform system, specified during appletdevelopment or packaging, or stored as a static value within the code,and cannot be changed.

Table 28 defines the settings for the Get Version APDU command:

TABLE 28 Internal Get Version CLA INS P1 P2 Le Data Le 90 10 00 00 00<none> 3

In one embodiment, no data is sent to the commerce applet. The Le datalength is 0x00.

The version information is contained within a three-byte response. TheLe data length is 0x03. A length of 0x00 is also allowed. Exemplaryresponse data elements are defined in Table 29:

TABLE 29 Response Data Data Element Byte Size Value CommerceSpecification Version Tag 1 0xDF12 Commerce Specification Version Length1 3 Commerce Specification Version Value 3 [Version (xx.yy.zz)] Total: 5

Table 30 defines the possible Status Word values that may be returned bythis command.

TABLE 30 Status Codes SWI sw2 Description 90 00 Successful Execution ofCommand 67 00 Wrong Data Length 69 09 Internal Error

Provision Applet

An applet provisional command, “Provision Applet,” allows theprovisioning (or update) of the consumer related data, including theconsumer ID and optionally related security data (key value andcertificates). The new/updated data values are specified via the commanddata. In an exemplary embodiment, the Provision Applet command may onlybe used to update the Consumer ID.

Tables 31 and 32 define the settings for the Provision Applet APDUcommand:

TABLE 31 Provision Applet CLA INS P1 P2 Le Data Le 90 12 00 00 XXTLV-Encoded Provisioning Data 00

The incoming data, illustrated in table 31, consists of the TLV encodedprovisioning data. Therefore, the Le data length is variable.

In one embodiment, no data is returned by the commerce applet 113. TheLe data length is 0x00.

TABLE 32 Command Data Data Element Byte Size· Value Provisioning DataElement Tag 1 [Element Tag] Element Data Length 1 xx Element Data Valuexx [Data] . . . Total: <var>

Table 33 defines the possible Status Word values that may be returned byProvision Applet command

TABLE 33 Status Codes SW1 SW2 Description 90 00 Successful Execution ofCommand 67 00 Wrong Data Length 69 09 Internal Error

Get Consumer Info

The Get Consumer Info command is used to obtain a subset of static datarelated to the token owner (i.e., consumer). This data includes thefollowing:

Consumer Identifier

Table 34 defines the settings for the Get Consumer Info APDU command:

TABLE 34 Get Consumer Info CLA INS P1 P2 Le Data Le 90 14 00 00 00<none> 00

No data is sent to the commerce applet 113. The Le data length is, forexample, 0x00. The actual length of the requested consumer informationreturned by the applet is variable, specific to the available consumerdata. Therefore, the Le data length is 0x00, allowing the applet tomanage a variable length response.

The response data is returned as a TLV formatted data steam. TheConsumer ID may also be returned.

TABLE 35 Response Data Data Element Byte Size Value Consumer ID Tag 10XDF21 Consumer ID Length 1 16 Consumer ID 16 [Consumer ID] Total: <var>

Table 36 defines the possible Status Word values that may be returned bythis command.

TABLE 36 Status Codes SW1 SW2 Description 90 00 Successful Execution ofCommand 67 00 Wrong Data Length 69 09 Internal Error

Get Commerce Data

The Get Commerce Data command provides commerce information (e.g.,loyalty, offers and rewards) for a specified merchant (or set ofmerchants), based on the specified merchant/loyalty identifiers andsupported offer types. This command provides a single point of contactfor reader 120 attached to the merchant POS system (e.g., POS terminal).

A date/time stamp, merchant ID, store ID, commerce protocol version, andmerchant capabilities byte can be sent as part of the incoming data.Additional loyalty identifiers may also be sent in order to specify(filter) the loyalty information requested. The applet shall search aloyalty data table (Table 5), for the specified merchant/loyalty programID(s) and retrieve the corresponding loyalty data. Additional offer typecodes may be also sent as part of the incoming data in order to specifythe type of offer information requested. The commerce applet 113searches the cached merchant data table (Table 25) for the specifiedmerchant identifier/offer code(s) and retrieves the corresponding offerdata.

Required Parameters include:

-   -   Date/Time Stamp    -   Merchant ID    -   Store ID    -   App Version

Once transmission has been successfully completed, the applet shallcreate an entry in its transaction log recording the commerce datarequest.

Tables 37 and 38 define the settings for the Get Commerce Data APDUcommand:

TABLE 37 Get Commerce Data CLA INS P1 P2 Lc Data 90 50 00 00 xx

The incoming data consists of a date/time stamp (used for transactionlogging), merchant identifier, store identifier, merchant capabilitiesbyte, and an optional set of additional data elements, including one ormore additional loyalty identifiers (indicating loyalty programssupported by the merchant location), and additional offer codes(indicating the type of offers supported by the merchant location). Inone embodiment, if a merchant does not specify a Merchant Capabilityparameter, a default mode supporting only merchant based loyalty andoffers is used.

The actual length of the requested commerce data returned by the appletis variable specific to the available loyalty/offers related data.Therefore, the Le data length is 0x00, allowing the applet to manage avariable length response.

TABLE 38 Command Data Data Element Byte Size Value Date/Time Stamp Tag 10xDF11 Date/Time Stamp Length 1 7 Date/Time Stamp 7 [Date/Time Stamp]Merchant ID Tag 1 0xDF31 Merchant ID Length 1 8 Merchant ID 8 [MerchantID] Store ID Tag 1 0x32 Store ID Length 1 32 Store ID 32 [Store ID]Commerce Version Tag 1 0xDF12 Commerce Version Length 1 3 CommerceVersion Data 2 [Commerce App Version] Merchant Capability Tag 1 0xDF33Merchant Capability Length 1 2 Merchant Capability Data 1 [MerchantCapability Code] Transaction ID Tag 1 0xDF61 Transaction ID Length 1 16Transaction ID 16 [Transaction ID] Additional Loyalty ID Tag 1 0xDF41Additional Loyalty ID Length 1 8 Additional Loyalty ID 8 [Loyalty ID] .. . Additional Offer Type Tag 1 0xDF54 Additional Offer Type Length 1 9Additional Offer Type Code 9 [Offer Type Code] . . . Total: <var>

The response data is returned as a TLV formatted data steam. The MoComplatform-specific consumer identifier and all relevant loyalty/offersdata are returned in a single data payload.

Consumer ID

The Consumer ID is sent in TLV format, where the data is sent using thetag CONSUMER_ID (0XDF21). In one embodiment, unless an error isdetected, the consumer ID shall always be returned.

Loyalty

In one embodiment, each instance of loyalty data shall consist of thefollowing TLV encoded data elements:

-   -   Loyalty Identifier    -   Loyalty Account Code

Within this data stream, the first tag shall contain the LoyaltyIdentifier tag (T) byte (0xDF41). The length (L) byte shall specify thelength of the Loyalty Identifier. The value (V) shall contain the actualLoyalty Identifier of L length for the corresponding Loyalty Data thatwill immediately follow.

The second tag should contain the Loyalty Account Code tag (T) byte(0xDF43). The length (L) byte shall specify the total length of theaccount code data linked to the previous Loyalty Identifier. The value(V) shall contain the actual loyalty data of L length.

Any additional loyalty identifiers found within the loyalty data tableare appended to the TLV encoded data payload using this same format.

Offers

Each instance of offer data shall consist of the following TLV encodeddata elements:

-   -   Offer ID    -   Offer Code

Within this data stream, the first tag contains the Offer ID tag (T)byte (0xDF51). The length (L) byte specifies the length of the Offer ID.The value (V) contains the Offer ID for the corresponding offer datathat will immediately follow.

The second tag preferably contains the Offer Code tag (T) byte value(0xDF53). The length (L) byte specifies the length of the Offer TypeCode. The value (V) contains the Offer Code data for the correspondingOffer ID.

Any additional offer identifiers found within the offer data table areappended to the TLV encoded data payload using this same format.Exemplary response data is defined in Table 39.

TABLE 39 Response Data Data Element Byte Size Value Consumer IdentifierTag 1 0XDF21 Consumer Identifier Length 1 16 Consumer Identifier 16[Consumer ID] Loyalty Identifier Tag 1 0xDF41 Identifier Length 1 8Loyalty Identifier 8 [Loyalty ID] Loyalty Account Code Tag 1 0xDF43Account Code Length 1 32 Loyalty Account Code 32 [Acct Code] . . . OfferID Tag 1 0xDF51 Offer ID Length 1 8 Offer ID Value 8 [Offer ID] OfferCode Tag 1 0xDF53 Offer Code Length 1 130 Offer Code Value 130 [OfferCode] . . . Total: <var>

Commerce applet 113 manages the transmission of multiple responsepackets (using the Get Response command) when the total data lengthexceeds 256 bytes. Table 40 defines the possible Status Word values thatmay be returned by the Get Response command.

TABLE 40 Status Codes SW1 SW2 Description 90 00 Successful Execution ofCommand 61 00 Successful Execution of Command w/Additional dataavailable via Get Response 67 00 Wrong Data Length 69 09 Internal Error

Post Transaction Data

The Post Transaction Data command provides a method through which theMerchant PoS system or payment terminal may return post-transactiondata, including redeemed coupons, new offers, e-receipts, or otherenhanced commerce data.

Tables 41 and 42 define the settings for the Post Transaction Data APDUcommand:

TABLE 41 Post Transaction Data CLA INS P1 P2 Le Data Le 90 52 00 00 xx<TLV-Encoded Transaction Data> 00

The incoming data consists of the TLV encoded provisioning data and aplatform signature for authenticity purposes. Therefore, the Le datalength is variable.

Data need not be returned by commerce applet 113. The Le data length isOxOO.

TABLE 42 Command Data Data Element Byte Size [Value] Post TransactionData Element Tag 1 [Element Tag] Element Data Length 1 xx Element DataValue xx [Data] . . . Total: <var>

Table 43 defines the possible Status Word values that may be returned bythe Post Transaction Data command.

TABLE 43 Status Codes SW1 SW2 Description 90 00 Successful Execution ofCommand 67 00 Wrong Data Length 69 09 Internal Error

Get Transaction Log

The Get Transaction Log is used to obtain all data stored in thetransaction log. This command is typically used by the commerce widgetfor the purpose of widget and secure element data synchronization tasks.

Table 44 defines the settings for the Get Transaction Log APDU command:

TABLE 44 Get Transaction Log CLA INS P1 P2 Le Data Le 90 54 00 Ox 00<none> P2 Value Applet Behavior OxOO Normal processing. OxO1 Cleartransaction log. No data transmitted. Ox02 Get Transaction Log Status

In one embodiment, no data is sent to the commerce applet. The Le datalength is OxOO. The actual length of the transaction data returned bythe applet is variable, depending on the number of transaction recordsand the variable length of the corresponding transaction log data.Therefore, the Le data length can be OxOO, allowing commerce applet 113to manage variable length response.

Preferably, response data is returned as a TLV formatted data steam.

Transaction Log Response Data

Each transaction log record shall consist of an Embedded-TLV TransactionLog tag followed by all related data elements. The data elementsincluded in the transaction record are a mirror of those provided duringthe corresponding Get Commerce Data command requested by theCommerce-enabled payment terminal (NFC reader) at the merchantpoint-of-sale. Additional transaction log records are appended to thedata using the same format. Table 45 illustrates exemplary responsedata.

TABLE 45 Response Data Data Element Byte Size Value Embedded TLVTransaction 1 0xDF60 Record Tag Embedded TLV Transaction 3 xx RecordLength TLV-encoded transaction xx xx data . . . Total: <var>

In one embodiment, commerce applet 113 manages the transmission ofmultiple response packets using the Get Response command when the totaldata length exceeds 256 bytes.

Transaction Log Status Response Data

When the transaction log status is requested, the commerce appletresponds with status information within an embedded TLV data payload.This data includes the number of available transaction log records,loyalty and offer records sent during the last transaction. This is thesame data payload provided to WCAp via the shared interface. Table 46illustrates exemplary response data.

TABLE 46 Response Data Data Element Byte Size Value Embedded TLVTransaction Status Tag 1 0xE4 Embedded TLV Transaction Record Length 10x0C Transaction Record Count Tag 1 0xDB Transaction Record Count Length1 0x02 Transaction Record Count Value 2 xx Last Transaction LoyaltyCount Tag 1 0xDC Last Transaction Loyalty Count Length 1 0x02 LastTransaction Loyalty Count Value 2 xx Last Transaction Offer Count Tag 10xDD Last Transaction Offer Count Length 1 0x02 Last Transaction OfferCount Value 2 xx Total: 14

Table 47 defines possible Status Word values that may be returned by theGet Transaction Log command.

TABLE 47 Status Codes SW1 SW2 Description 90 00 Successful Execution ofCommand 61 00 Successful Execution of Command w/Additional dataavailable via Get Response 67 00 Wrong Data Length 6B 00 Wrong P1/P2Parameter 69 09 Internal Error

Get Internal Error Code

The Get Internal Error Code command is used to retrieve the lastinternal error code generated by the Commerce Services applet. This codeprovides a value that can be cross-referenced with the Internal ErrorCodes table (Table 26), providing a more specific description of theerror. This command is used for more detailed diagnostic and errorresolution.

Table 48 defines the settings for the Get Internal Error Code APDUcommand:

TABLE 48 Get Internal Error Code CLA INS P1 P2 Le Data Le 90 70 00 00 00<none> 02

In one embodiment, no data is sent to the applet. The Le data length is0x00. The error code is contained within a two-byte response. Therefore,the Le data length is 0x02.

The following table defines the possible Status Word values that may bereturned by this command.

TABLE 49 Status Codes SW1 SW2 Description 90 00 Successful Execution ofCommand 67 00 Wrong Data Length 69 09 Internal Error

Loyalty Services Get Loyalty Data

The Get Loyalty Data command defined in Tables 50 and 51 is used toobtain the stored loyalty information based on a specified loyaltyidentifier. The two-byte loyalty identifier may be sent as part of theincoming data in order to specify the loyalty information requested.Commerce applet 113 searches a table of loyalty data for the specifiedmerchant/loyalty ID and retrieves all of the corresponding loyalty data.

TABLE 50 Get Loyalty Data CLA INS P1 P2 Le Data Le 90 30 00 00 xx[TLV-Encoded Loyalty ID] 00

The (optional) incoming data shall consist of a TLV encoded loyaltyidentifier indicating the loyalty information requested. If Le is set to0x00 (no data incoming data is specified), all available loyaltyidentifiers are returned.

The actual length of the requested loyalty data returned by the appletis variable specific to the requested/available loyalty data. Therefore,the Le data length is 0x00, allowing the applet to manage a variablelength response.

TABLE 51 Command Data Byte Data Element Size Value Loyalty IdentifierTag 1 0xDF41 Loyalty Identifier Length 1 8 Loyalty Identifier 8 [LoyaltyID] Total: <var>

The response data (Table 51) is returned as a TLV formatted data stream.All of the relevant loyalty data is returned in a single data payload.

In one embodiment, if a loyalty data dump is requested (Le=0x00), a listof all Loyalty Identifiers is returned in LV (no tag) format. Thus, onlythe Loyalty Identifier for each entry is included in the data payload.

Each instance of loyalty data includes the following data elements:

-   -   Loyalty Identifier    -   Loyalty Account Code

TABLE 52 Response Data Byte Data Element Size Value Loyalty IdentifierTag 1 0xDF41 Identifier Length 1 8 Loyalty Identifier 8 [Loyalty ID]Loyalty Account Code Tag 1 0xDF43 Account Code Length 1 xx LoyaltyAccount Code xx [Acct Code] Total (Max): <var>

Table 53 defines the possible Status Word values that may be returned bythis command.

TABLE 53 Status Codes SW1 SW2 Description 90 00 Successful Execution ofCommand 61 00 Successful Execution of Command w/Additional dataavailable via Get Response 67 00 Wrong Data Length 69 09 Internal Error

Update Loyalty Data

The Update Loyalty Data command is used to add or update the specifiedmerchant loyalty data. The data is sent as TLV formatted data stream. Ifthe specified loyalty identifier exists, the corresponding loyalty dataelements are updated. If the loyalty identifier does not exist, a newdata record is created in the loyalty data table. Tables 54 and 55define the settings for the Update Loyalty Data APDU command:

TABLE 54 Update Loyalty Data CLA INS P1 P2 Le Data Le 90 32 00 00 xxTLV-Encoded Loyalty Data 00

The incoming data shall consist of TLV encoded loyalty data. Therefore,the Le data length is variable. In one embodiment, no data is returnedby the applet. The Le data length is be 0x00.

TABLE 55 Command Data Byte Data Element Size Value Loyalty IdentifierTag 1 0xDF41 Identifier Length 1 8 Loyalty Identifier 8 [Loyalty ID]Loyalty Account Code Tag 1 0xDF43 Account Code Length 1 xx LoyaltyAccount Code Xx [Acct Code] Total: <var>

Table 56 defines the possible Status Word values that may be returned bythis command.

TABLE 56 Status Codes SW1 SW2 Description 90 00 Successful Execution ofCommand 67 00 Wrong Data Length 69 09 Internal Error

Delete Loyalty Data

The Delete Loyalty Data command is used to delete the specified merchantloyalty data. The one-byte merchant code is specified via the commanddata. Alternatively, the P2 byte may be used to purge all existingoffers. If P2 is set to 0xFF, the entire offer data store is deleted.

Tables 57 and 58 define the settings for the Delete Loyalty Data APDUcommand:

TABLE 57 Delete Loyalty Data CLA INS P1 P2 Le Data Le 90 34 00 xx xxTLV-Encoded Loyalty ID 00

The incoming data consists of a TLV-encoded loyalty identifier.Therefore, the Le data length is variable.

In one embodiment, no data is returned by commerce applet 113. The Ledata length is 0x00.

TABLE 58 Command Data Byte Data Element Size Value Loyalty IdentifierTag 1 0xDF41 Loyalty Identifier Length 1 xx Loyalty Identifier Xx[Loyalty ID] Total: <var> P2 Value Applet Behavior 0x00 Normalprocessing. 0xFF Purge loyalty table (delete all records)

Table 59 defines the possible Status Word values that may be returned bythe Delete Loyalty Data command.

TABLE 59 Status Codes SW1 SW2 Description 90 00 Successful Execution ofCommand 67 00 Wrong Data Length 69 09 Internal Error

Merchant Cached Data Services Get Cached Merchant Data

The Get Cached Merchant Data command is used to obtain all previouslyloaded data pertaining to a specific merchant. The merchant identifiermay be sent as part of the incoming data in order to specify thepre-loaded data requested. If provided, the commerce applet searches atable of cached merchant data for the specified merchant ID andretrieves all of the corresponding data. This command may also be usedto obtain information on all cached merchants stored within the CommerceServices applet.

Table 60 defines the settings for the Get Cached Merchant Data APDUcommand:

TABLE 60 Get Cached Merchant Data CLA INS P1 P2 Le Data Le 90 56 00 00xx <none> 00

In one embodiment, no data is sent to the applet. The Le data length is0x00. The actual length of the requested cached merchant data returnedby the applet is variable, specific to the requested/available cachedmerchant data. Therefore, the Le data length is OxOO; allowing theapplet to manage a variable length response.

The response data (Table 61) may be returned as a TLV formatted datastream. All of the cached data is returned in a single data payload.Each instance of cached merchant data includes the followingcorresponding cached merchant data elements (if available):

-   -   Merchant Identifier    -   Loyalty Identifier    -   Loyalty Account Code    -   Offer Identifier(s)    -   Offer Code(s)

TABLE 61 Response Data Byte Data Element Size Value Merchant ID Tag 10xDF31 Merchant ID Length 1 8 Merchant ID 8 [Merchant ID] Loyalty ID Tag1 0xDF41 Loyalty ID Length 1 8 Loyalty ID Value 8 [Loyalty ID] LoyaltyAccount Code Tag 1 0xDF43 Loyalty Account Code Length 1 32 LoyaltyAccount Code Value 32 [Loyalty Account Code] . . . Offer ID Tag 1 0xDF51Offer ID Length 1 xx Offer ID Value Xx [Offer ID] Offer Code Tag 10xDF53 Offer Code Length 1 xx Offer Code Value Xx [Offer Code] . . .Total: <var>

In an exemplary embodiment, the cached merchant data will beloaded/managed by the wallet application and may include multiple offerIDs/codes pertaining to that specific merchant. However, the appletshall prefix the consumer identifier to the response data and append anyadditional loyalty/offer data requested by the Get Commerce Datacommand.

Table 62 defines the possible Status Word values that may be returned bythis command.

TABLE 62 Status Codes SW1 SW2 Description 90 00 Successful Execution ofCommand 67 00 Wrong Data Length 69 09 Internal Error

Update Cached Merchant Data

The Update Cached Merchant Data command is used to update the cached(quick-response) data for a specified merchant. The data is sent as TLVformatted data stream, similar to the response data returned by the GetCommerce Data command. This command is used to pre-load a givenmerchant's Get Commerce Data response.

Tables 63 and 64 define the settings for the Update Cached Merchant DataAPDU command:

TABLE 63 Update Cached Merchant Data Data CLA INS P1 P2 Le TLV-EncodedLe 90 58 00 Ox xx Cached Merchant Data] 02 P2 Value Applet Behavior OxOONormal processing. OxO1 APDU Chain (data will be appended to CMD buffer)OXff Delete cached merchant data [Lc = OJ

The incoming data consists of embedded TLV encoded cached merchant data.Therefore, the Le data length is variable.

Commerce applet returns a two byte response containing the number ofavailable bytes remaining in the cached merchant data buffer. Therefore,the Le data length is Ox02 (or OxOO).

TABLE 64 Command Data Byte Data Element Size Value Merchant ID Tag 10xDF31 Merchant ID Length 1 8 Merchant ID Value 8 [Merchant ID] CachedMerchant Data Offer Count Tag 1 0x57 Cached Merchant Data Offer CountLength 1 1 Cached Merchant Data Offer Count Value 1 [CMD Offer Count]Embedded TLV Cached Merchant Data Tag 1 0x58 Embedded TLV CachedMerchant Data Xx xx Length Offer ID Tag 1 0xDF51 Offer ID Length 1 xxOffer ID Value Xx [Offer ID] Offer Code Tag 1 0xDF53 Offer Code Length 1xx Offer Code Value Xx [Offer Code] . . . Total: <var>

The response data (Table 65) returned by the command consists of a2-byte (short) value representing the number of remaining bytesavailable in the cached merchant data buffer. This allows the walletapplication 114 to manage how many cached offers can “fit” into theCommerce Services applet.

TABLE 65 Response Data Byte Data Element Size Value Available CachedMerchant 2 xx Data Buffer (bytes) Size Total: 2

Table 66 defines the possible Status Word values that may be returned bythis command.

TABLE 66 Status Codes SW1 SW2 Description 90 00 Successful Execution ofCommand 67 00 Wrong Data Length 69 09 Internal Error

Table 67 defines the data elements and corresponding tag values andtarget/max byte sizes used by commerce based applications according tothe example aspects described herein. Additional values have beenprovided for those elements with a limited/fixed value range.

TABLE 67 Commerce Services Max Data Element Tag Size Description SharedData Elements DATE TIME STAMP 0x11 7 Date/Time stamp COMMERCE_APP_ 0x123 Supported Commerce App VERSION Version Number Consumer Data ElementsCONSUMER ID 0x21 16 MoCom Platform specific consumer identifier CONSUMERKEY 0x22 16 MoCom Platform generated consumer specific 3DES key CONSUMERCERT 0x23 8 MoCom Platform generated consumer signature/certificateMerchant Data Elements MERCHANT ID 0x31 8 MoCom Platform specificmerchant identifier MERCHANT_STORE_ID 0x32 32 MoCom Platform specificmerchant store identifier MERCHANT 0x33 2 Supported Commerce AppCAPABILITY Services READER_START_MODE 0x34 2 NFC enabled paymentterminal startup mode (provided by Merchant POS System during init)Merchant Capabilities MERCAP MERCHANT_ 0x80 1 The Get Commerce DataLOYALTY includes a valid merchant identifier used to determine theLoyalty data received by the applet. MERCAP ADDITIONAL 0x40 1 The GetCommerce Data LOYALTY request includes additional Loyalty Identifiers.Additional Loyalty data is determined by the specified Loyalty ID(s).MERCAP MERCHANT_ 0x20 1 Offer type fields aincluded in OFFERS GetCommerce Data request MERCAP ADDITIONAL_ 0x10 1 The Get Commerce DataOFFERS includes a valid merchant identifier used to determine the offersdata received by the applet. MERCAP PAYMENT 0x08 1 Merchant supportscontactless payment. MERCAP CLOUD 0x02 1 The merchant supports cloudredemption. Only the Consumer ID will be returned by the applet forresolution in the cloud. MERCAP REDEMPTION 0x01 1 The Merchant & PaymentTerminal support the transmission of offer redemption data (from theECR) to the applet via the Post Transaction command. MoCom Platform DataElements PLATFORM SIGNATURE 0x71 8 MoCom Platform generatedMAC/Signature appended to command/data originating from the platform forremote verification purposes (data integrity/authenticity). PLATFORM KEY0x72 16 MoCom Platform Key PLATFORM CERT 0x73 8 MoCom PlatformCertificate Loyalty Max Data Element Tag Size Description Loyalty DataElements EMBEDDED_TLV_ 0x40 xx Embedded TLV loyalty data LOYALTY DATAtag LOYALTY ID 0x41 8 MoCom Platform specific loyalty identifier LOYALTYSTATUS 0x42 1 Loyalty card/account status (see below) LOYALTY ACCOUNT_0x43 32 Loyalty account (barcode data) CODE LOYALTY MAC_ 0x44 8 MoComPlatform specific SIGNATURE MAC/Signature for integrity/ authenticityverification Loyalty Status LOYALTY STATUS_ 0x00 1 Loyalty accountinactive. Not DEACTIVATED available. LOYALTY STATUS_ 0x01 1 Loyaltyaccount active. ACTIVE Available for use. Transaction Log Max DataElement Tag Size Description Transaction Data Elements EMBEDDED_TLV_0x60 xx Transaction log record data TRANSACTION LOG tag TRANSACTION ID0x61 16 Transaction_ID (assigned by ECR) TRANSACTION STATUS 0x62 11Transaction status; including status byte (see below), 2-byte statusword, 2-byte internal error code, 2-byte number of available transactionrecords, 2-byte last transaction loyalty count, 2-byte last transactionoffer count Transaction Status TRANSACTION_ 0x00 1 Commerce datareceived. STATUS_SUCCESSFUL Result pending. TRANSACTION_ 0x01 1 Errordetected. Internal error STATUS_FAILED code appended. Offers Max DataElement Tag Size Description Offer Data Elements EMBEDDED_TLV_ 0x50 xxEmbedded TLV offer data tag OFFER_DATA OFFER ID 0x51 8 MoCom Platformspecific offer identifier OFFER STATUS 0x52 1 Offer status (see below)OFFER CODE 0x53 48 Offer (UPC/EPC/GS1 Databar) barcode data OFFER TYPECODE 0x54 9 Offer Type (see below) OFFER MAC_ 0x55 8 MoCom Platformspecific data SIGNATURE security signature OFFER UPDATE FLAG 0x56 1Update flag (synchronization status) CACHED MERCHANT_ 0x57 1 Offer Countwithin Cached DATA OFFER COUNT Merchant Data EMBEDDED_TLV_ 0x58 xxEmbedded TLV Cached CACHED_MERCHANT_ Merchant (Offer) Data DATA OfferStatus OFFER STATUS_ 0x00 1 Offer present in data store, DEACTIVATED butnot available for redemption. OFFER STATUS_ 0x01 1 Offer present in datastore. ACTIVE Available for redemption. OFFER STATUS_ 0x10 1 ExpiredOffer EXPIRED OFFER STATUS_ 0x20 1 Offer has been presented forSUBMITTED redemption. Result pending. OFFER STATUS_ 0x40 1 Offer hasbeen redeemed. REDEEMED Offer Type OFFER_TYPE_CLASS_01 0x01 1 OfferClass: Merchant Specific (merchant ID appended) OFFER TYPE CLASS 02 0x021 Offer Class: CPG OFFER TYPE CLASS 03 0x03 1 Offer Class: Misc

Specially Formatted Data Elements

A few of the data elements included in the commerce data payload includea format byte that identifies the data encoding used for that element.The data encoding is specified by the merchant to ensure compatibilityat the point of sale. The formatted data value is supplied by the MoComplatform to the wallet application. Thus, no additionalinterpreting/formatting is necessary between the platform, wallet,secure element, and payment terminal. It is the role of the paymentterminal (or merchant POS system) to properly interpret the data andsupply it to the merchant system for processing.

The following data elements shall include the format byte:

-   -   Loyalty Account Code    -   Offer Code

Table 68 defines the possible format byte values and their correspondingencoding rule:

TABLE 68 Format Byte Encoding Rule Description 0x00 Hexadecimal Eachbyte of data is encoded in (raw) hexadecimal format. 0x01 Binary CodedDecimal Each nibble represents a single digit. (BCD) Thus, only decimalvalues are specified. A data stream containing an odd number (length) ofdigits includes the hex value ‘F’ in the first nibble of the datastream. 0x02 ASCII Each byte represents an ACII value that isinterpreted as such and handled as its corresponding CHAR value. In mostcases, these data streams will be converted into a String before beingpassed to the merchant POS system for processing.

A BCD encoded data value that includes the hexadecimal value ‘F’ in thefirst nibble shall identify a data stream containing an odd number ofdigits. Thus, the BCD data stream 12345 is encoded in 3 byte buffer asfollows: 0xF12345.

Computer Readable Medium Implementation

The example embodiments described above such as, for example, thesystems and procedures depicted in or discussed in connection with FIGS.1-7 or any part or function thereof, may be implemented by usinghardware, software or a combination of the two. The implementation maybe in one or more computers or other processing systems. Whilemanipulations performed by these example embodiments may have beenreferred to in terms commonly associated with mental operationsperformed by a human operator, no human operator is needed to performany of the operations described herein. In other words, the operationsmay be completely implemented with machine operations. Useful machinesfor performing the operation of the example embodiments presented hereininclude general purpose digital computers or similar devices.

FIG. 8 is a block diagram of a general and/or special purpose computer800, in accordance with some of the example embodiments of theinvention. The computer 800 may be, for example, a user device, a usercomputer, a client computer and/or a server computer, among otherthings.

The computer 800 may include without limitation a processor device 810,a main memory 825, and an interconnect bus 805. The processor device 810may include without limitation a single microprocessor, or may include aplurality of microprocessors for configuring the computer 800 as amulti-processor system. The main memory 825 stores, among other things,instructions and/or data for execution by the processor device 810. Themain memory 625 may include banks of dynamic random access memory(DRAM), as well as cache memory.

The computer 800 may further include a mass storage device 830,peripheral device(s) 840, portable storage medium device(s) 850, inputcontrol device(s) 880, a graphics subsystem 860, and/or an outputdisplay 870. For explanatory purposes, all components in the computer800 are shown in FIG. 8 as being coupled via the bus 805. However, thecomputer 800 is not so limited. Devices of the computer 800 may becoupled via one or more data transport means. For example, the processordevice 810 and/or the main memory 825 may be coupled via a localmicroprocessor bus. The mass storage device 830, peripheral device(s)840, portable storage medium device(s) 850, and/or graphics subsystem860 may be coupled via one or more input/output (I/O) buses. The massstorage device 830 may be a nonvolatile storage device for storing dataand/or instructions for use by the processor device 810. The massstorage device 830 may be implemented, for example, with a magnetic diskdrive or an optical disk drive. In a software embodiment, the massstorage device 830 is configured for loading contents of the massstorage device 830 into the main memory 825.

The portable storage medium device 850 operates in conjunction with anonvolatile portable storage medium, such as, for example, a compactdisc read only memory (CD-ROM), to input and output data and code to andfrom the computer 800. In some embodiments, the software for storing aninternal identifier in metadata may be stored on a portable storagemedium, and may be inputted into the computer 800 via the portablestorage medium device 850. The peripheral device(s) 840 may include anytype of computer support device, such as, for example, an input/output(I/O) interface configured to add additional functionality to thecomputer 800. For example, the peripheral device(s) 840 may include anetwork interface card for interfacing the computer 800 with a network820.

The input control device(s) 880 provide a portion of the user interfacefor a user of the computer 800. The input control device(s) 880 mayinclude a keypad and/or a cursor control device. The keypad may beconfigured for inputting alphanumeric characters and/or other keyinformation. The cursor control device may include, for example, amouse, a trackball, a stylus, and/or cursor direction keys. In order todisplay textual and graphical information, the computer 800 may includethe graphics subsystem 860 and the output display 870. The outputdisplay 870 may include a cathode ray tube (CRT) display and/or a liquidcrystal display (LCD). The graphics subsystem 860 receives textual andgraphical information, and processes the information for output to theoutput display 870.

Each component of the computer 800 may represent a broad category of acomputer component of a general and/or special purpose computer.Components of the computer 800 are not limited to the specificimplementations provided here.

Portions of the example embodiments of the invention may be convenientlyimplemented by using a conventional general purpose computer, aspecialized digital computer and/or a microprocessor programmedaccording to the teachings of the present disclosure, as is apparent tothose skilled in the computer art. Appropriate software coding mayreadily be prepared by skilled programmers based on the teachings of thepresent disclosure.

Some embodiments may also be implemented by the preparation ofapplication-specific integrated circuits, field programmable gatearrays, or by interconnecting an appropriate network of conventionalcomponent circuits.

Some embodiments include a computer program product. The computerprogram product may be a storage medium or media having instructionsstored thereon or therein which can be used to control, or cause, acomputer to perform any of the procedures of the example embodiments ofthe invention. The storage medium may include without limitation afloppy disk, a mini disk, an optical disc, a Blu-Ray Disc, a DVD, aCD-ROM, a micro-drive, a magneto-optical disk, a ROM, a RAM, an EPROM,an EEPROM, a DRAM, a VRAM, a flash memory, a flash card, a magneticcard, an optical card, nanosystems, a molecular memory integratedcircuit, a RAID, remote data storage/archive/warehousing, and/or anyother type of device suitable for storing instructions and/or data.

Stored on any one of the computer readable medium or media, someimplementations include software for controlling both the hardware ofthe general and/or special computer or microprocessor, and for enablingthe computer or microprocessor to interact with a human user or othermechanism utilizing the results of the example embodiments of theinvention. Such software may include without limitation device drivers,operating systems, and user applications. Ultimately, such computerreadable media further includes software for performing example aspectsof the invention, as described above.

Included in the programming and/or software of the general and/orspecial purpose computer or microprocessor are software modules forimplementing the procedures described above.

While various example embodiments of the invention have been describedabove, it should be understood that they have been presented by way ofexample, and not limitation. It is apparent to persons skilled in therelevant art(s) that various changes in form and detail can be madetherein. Thus, the invention should not be limited by any of the abovedescribed example embodiments, but should be defined only in accordancewith the following claims and their equivalents.

In addition, it should be understood that the figures are presented forexample purposes only. The architecture of the example embodimentspresented herein is sufficiently flexible and configurable, such that itmay be utilized and navigated in ways other than that shown in theaccompanying figures.

Further, the purpose of the Abstract is to enable the U.S. Patent andTrademark Office and the public generally, and especially thescientists, engineers and practitioners in the art who are not familiarwith patent or legal terms or phraseology, to determine quickly from acursory inspection the nature and essence of the technical disclosure ofthe application. The Abstract is not intended to be limiting as to thescope of the example embodiments presented herein in any way. It is alsoto be understood that the procedures recited in the claims need not beperformed in the order presented.

1-18. (canceled)
 19. A mobile device configured for contactless commercetransactions with payment terminals, the mobile device comprising: atleast one memory operable to store commerce data and financialinstrument data; and one or more processors coupled to the at least onememory, the one or more processors configured to: in response to aselect commerce command including a commerce application identifier(AID) corresponding to a commerce application, transmit to a paymentterminal a first response based on the commerce AID; in response to adata request including merchant specific information, transmit to thepayment terminal a second response including a package of data includingat least one commerce element corresponding to the merchant specificinformation; and in response to a select payment command including apayment AID corresponding to a payment application, transmit to thepayment terminal a third response comprising payment data correspondingto the payment AID, the payment data configured for transactionprocessing by the payment terminal.
 20. The mobile device of claim 19,wherein the one or more processors are configured to: detect a tap basedon the mobile device being within a proximity to a payment terminal; andin response to detecting the tap, receive from the payment terminal thefirst select commerce command including the first AID corresponding tothe first commerce application.
 21. The mobile device of claim 19,wherein the one or more processors are configured to: receive from thepayment terminal the data request including the merchant specificinformation.
 22. The mobile device of claim 19, wherein: the commerceelements include at least a portion of the commerce data from the atleast one memory.
 23. The mobile device of claim 19, wherein the one ormore processors are configured to: receive from the payment terminal theselect payment command including the payment AID corresponding to thepayment application.
 24. The mobile device of claim 19, wherein the oneor more processors are configured to: transmit to the payment terminalfile control information (FCI) corresponding to the payment application;and wherein the payment data includes at least a portion of thefinancial instrument data stored in the at least one memory.
 25. Themobile device of claim 19, wherein the tap is a first tap, the one ormore processors are configured to: detect a second tap based on themobile device being within a proximity to a payment terminal.
 26. Themobile device of claim 25, wherein: the first tap and the second tapoccur in response to a first tap request and a second tap request,respectively, received from the payment terminal.
 27. The mobile deviceof claim 25, wherein the one or more processors are configured to:transmit to the payment terminal file control information (FCI)corresponding to the payment application; receive from the paymentterminal an additional select commerce command including the AIDcorresponding to the commerce application; transmit to the paymentterminal a third response based on the additional select commercecommand; receive from the payment terminal post-transaction data; andtransmit to the payment terminal a fourth response based on thepost-transaction data.
 28. The mobile device of claim 19, wherein thepayment terminal comprises a contactless reader and/or a point of saleterminal.
 29. The mobile device of claim 19, wherein the mobile devicereceives the select payment command prior to receiving the first selectcommerce command.
 30. A method for managing contactless commercecontractions between mobile devices and payment terminals, the methodcomprising: in response to a select commerce command including acommerce application identifier (AID) corresponding to a commerceapplication, transmit to a payment terminal a first response based onthe commerce AID; in response to a data request including merchantspecific information, transmit to the payment terminal a second responseincluding a package of data including at least one commerce elementcorresponding to the merchant specific information; and in response to aselect payment command including a payment AID corresponding to apayment application, transmit to the payment terminal a third responsecomprising payment data corresponding to the payment AID, the paymentdata configured for transaction processing by the payment terminal. 31.The method of claim 30, further comprising: detect a tap based on themobile device being within a proximity to a payment terminal; and inresponse to detecting the tap, receive from the payment terminal thefirst select commerce command including the first AID corresponding tothe first commerce application.
 32. The method of claim 30, furthercomprising: receive from the payment terminal the data request includingthe merchant specific information.
 33. The method of claim 30, wherein:the commerce elements include at least a portion of commerce data fromat least one memory of the mobile device.
 34. The method of claim 30,further comprising: receive from the payment terminal the select paymentcommand including the payment AID corresponding to the paymentapplication.
 35. The method of claim 30, further comprising: transmit tothe payment terminal file control information (FCI) corresponding to thepayment application; and wherein the payment data includes at least aportion of the financial instrument data stored in the at least onememory.
 36. A system to manage contactless commerce transactions, thesystem comprising: at least one memory; and one or more processorscoupled to the at least one memory, the one or more processorsconfigured to: in response to a tap associated with a mobile device anda payment terminal, transmitting to the mobile device a select commercecommand including a commerce application identifier (AID) correspondingto a commerce application; in response to a first response from themobile device based on the commerce AID, transmitting, to the mobiledevice, a data request including merchant specific information;receiving, from the mobile device, a second response including a packageof data based on the data request, the package of data including atleast one commerce element corresponding to the merchant specificinformation; transmitting, to the mobile device, a select paymentcommand including a payment AID corresponding to a payment application;and receiving, from the mobile device, a third response comprisingpayment data corresponding to the payment AID corresponding to thepayment application, the payment data configured for transactionprocessing by the payment terminal.
 37. The system of claim 36, whereinthe one or more processors are configured to: identify the tapassociated with a mobile device and a payment terminal, the tapoccurring when the mobile device is placed within a proximity to thepayment terminal; and receive, from the mobile device, the firstresponse based on the commerce AID; wherein the first response indicatesthat the mobile device is compatible with providing commerce elementscorresponding to the first commerce application.
 38. The system of claim36, wherein the one or more processors are configured to: transmit tothe mobile device a payment AID request; and receiving from the mobiledevice the payment AID corresponding to the payment application; whereinthe select payment command including the payment AID corresponding tothe payment application is transmitted after receiving, from the mobiledevice, the payment AID corresponding to the payment application. 39.The system of claim 36, wherein the one or more processors areconfigured to: determine that the select commerce command wassuccessfully processed; and transmit the at least one commerce elementto a merchant point of sale computing system.
 40. The system of claim36, wherein the tap is a first tap and the one or more processors areconfigured to: identify a second tap associated with the mobile deviceand the payment terminal; and in response to identifying the second tap,transmit to the mobile device post-transaction data.
 41. The system ofclaim 36, wherein the tap is a first tap and the one or more processorsare configured to: identify a second tap associated with the mobiledevice and the payment terminal; receive, from the mobile device, filecontrol information (FCI) corresponding to the payment application;transmit, to the mobile device, an additional select commerce commandincluding the commerce AID corresponding to the commerce application;receive, from the mobile device, a third response based on theadditional select commerce command; and transmit to the mobile devicepost-transaction data.